ninit-pidfile(8)

NAME
ninit-pidfile - work around daemons that always fork

SYNOPSIS
ninit-pidfile servicename pidfile [ -H home ] command [parameters]

DESCRIPTION
ninit-pidfile is used to work around daemons that insist on forking into the background, but that do write a correct pid file. ninit-pidfile forks the actual service, then waits for the pidfile to be written. Once it can read the pid from the pidfile it will tell ninit the real pid and quit.

OPTIONS

servicename
    the name of the service ninit-pidfile is installed for

pidfile
    the filename to read the pid from

command
    the real command to start

parameters
    additional parameters for the command

-H home
    the home of ninit. Default: /etc/ninit

USAGE
With ninit you can prepare a service and if it forks and writes the PID in some file then type in the service directory:
    echo /path/to/deamon.pidfile > pidfile For apache this looks like:
    cd /etc/ninit/apache
    echo /var/run/apache.pid > pidfile Don't use hard or soft links here!
Then ninit will start apache using ninit-pidfile

AUTHOR
pidfilehack was written by Felix von Leitner. This manpage was written by Erich Schubert <erich@debian.org> for the Debian GNU/Linux operating system.

SEE ALSO
ninit(8), nsvc(8), pidfilehack(8)