On Thu, Jul 01 at 05:59PM +0100, Thomas Adam wrote: > --- Will Trillich <[EMAIL PROTECTED]> wrote: > > #!/bin/bash > > /etc/init.d/some-daemon-here restart > > Better to use 'invoke-rc.d' here: > > invoke-rc.d <script> restart
for daemon-config-file-settings, i'm more comfortable specifying the whole path. less chance of intervention or misdirection based on $PATH mungings... is invoke-rc.d similar to the "service" function on other distros? (sarge already has a "_service" for bash to facilitate command-line word completion... and i understand that the "service" function/script/alias is on its way.) and WHY is invoke-rc.d * better than /etc/init.d/*? and is that reason still applicable for daemon configs? (don't you stick with full path names in your cron jobs?) > > which is effectively a "start-some-thing &" and quick > > return... > > > > or does it need to be the non-returning call to the daemon > > itself, so that the daemon is a child of the "supervise" > > process? if so, ick. > > I'm not quite sure what you're asking here. There's no need to > background that (rather pointless) wrapper script, since the > daemon will fork if its own accord. right. here's my question: according to the not-so-very-loquacious documentation at http://cr.yp.to/ -- " supervise switches to the directory named s and starts ./run. It restarts ./run if ./run exits. It pauses for a second after starting ./run, so that it does not loop too quickly if ./run exits immediately. " looks like it's expecting ./run to be a long-duration process, such as a database server itself, for example, that service will then restart when the thing dies. it's NOT expecting (if i get the gist of the english there) that this will be a quickie "start a daemon somewhere else" because 1) there seems to be no facility for checking for a daemon process, only the ./run process (i.e. child processes of supervise) 2) when ./run exits immediately, supervise will re-launch it (after waiting for a whole second) so our daemons will get re-initialized sixty times a minute, and for something like a database server, that's very much badness unless i misunderstand, this seems to be a "run-and-monitor home grown programs and scripts, do your system daemon resurrection elsewhere"... no? ====== btw -- "restartd" seems to be just the item we're looking for. it's a bit terse, too, but it monitors already-running items and lets you specify a command to resurrect (or terminate) accordingly. not too advanced, and needs better documentation, but it works just fine -- at least, for us. -- I use Debian/GNU Linux version 3.0; Linux boss 2.4.18-bf2.4 #1 Son Apr 14 09:53:28 CEST 2002 i586 unknown DEBIAN NEWBIE TIP #14 from Will Trillich <[EMAIL PROTECTED]> : What's a RUNLEVEL? It's simply a big-time setting group; runlevel 2 might have a full-blown web server plus X running, and runlevel 3 might be ssh-only, for secure logins. Check /etc/inittab (and /etc/rc<RUNLEVEL>.d/*) for details on how yours are set up. And try "man runlevel". Also see http://newbieDoc.sourceForge.net/ ... -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]