Linux.com

Consider using start-stop-daemon

Posted by: Anonymous Coward on August 11, 2005 03:33 PM
Rather than killing off all processes using killproc (which for example doesn't happen to be available on my Gentoo system), you could use the much more powerful start-stop-daemon coming from the Debian distribution.

The recent versions are able to (among other things) - create the PID file
- stop the daemon based on the PID found inside that file
- do chuid and chgid calls
- either chroot or working directory
- seng signals to reload the config rather than restart

By doing slight changes to the source code, it rungs fine on Solaris based servers too.

The article might be a good starting point, but especially the "rm -rf" approach doesn't make me feel very relieved.

#

Return to Managing Linux daemons with init scripts