Comment 2 for bug 174466

Revision history for this message
David Ramsden (david-hexstream) wrote : Re: nagios2 init script has wrong PID file

Exactly. It was after a "/etc/init.d/nagios2 restart" that I noticed we were getting two alerts emailed to us. Process list showed two nagios processes running and after some investigation I traced it back to the PID file problem in the init script.

However, I'm not sure why the restart spawns another nagios process? Surely it should be able to read the nagios configuration file and determine the PID file location in the first instance instead of falling back to the hard coded "THEPIDFILE='/var/run/nagios2/nagios.pid'"? I'll try to find 5 minutes to add a "set -x" to the init script and see exactly what's going on.