On Sat, 27 Feb 2010 01:00:43 +0200 Alan McKinnon <alan.mckin...@gmail.com> wrote:
> > Where I'm weak is the part where the custom script checks if the > > daemon is running, before the script itself starts. That part would > > need to be something pretty fool proof... maybe just grep ps output > > for the daemon? I have a perl fastAGI script that launches in /etc/init.d/.... I just cribbed some code from something there... in my perl script: log_file=>'Sys::Syslog', pid_file=>'/var/run/evolone_agi.pid'; Sys::Syslog" is an interface to the UNIX syslog(3) program. from /etc/init.d/evolone_agi depend() { need net asterisk postgresql-8.4 } As for reading new information, there are a gazillion ways. Trap a signal to reread the configs? reload() { ebegin "Reloading evolone_agi configuration" start-stop-daemon --signal 1 --pidfile /var/run/evolone_agi.pid eend $? "Error reloading evolone_agi" } .. for example. Hope this helps. '-) -- |\ /| | | ~ ~ | \/ | |---| `|` ? | |ichael | |iggins \^ / michael.higgins[at]evolone[dot]org