daemon daemon/nagios { need = system/initial system/mountfs net/lo use = net/eth0 require_network daemon { /usr/bin/nagios -v /etc/nagios/nagios.cfg > /dev/null 2>&1; if [ $? -eq 0 ]; then su - nagios -c "touch /var/log/nagios/nagios.log /var/log/nagios/retention.dat" rm -f /var/log/nagios/rw/nagios.cmd # Create the pid file and give it to the nagios user, so that nagios can write it touch /var/run/nagios.pid chown nagios:nagios /var/run/nagios.pid /usr/bin/nagios -d /etc/nagios/nagios.cfg else echo "CONFIG ERROR! Start aborted. Check your Nagios configuration." exit 1 fi } daemon_args = -d /etc/nagios/nagios.cfg pid_file = /var/run/nagios.pid }