From:
[email protected]
Package: nagios
Severity: normal
Tags: patch
Hello
If /var/run/nagios/nagios.pid is not present nagios fails to start...
Here is a small patch for the initscript that just adds a check for that
file
--- nagios_orig 2004-08-11 08:58:10.000000000 +0300
+++ nagios 2004-08-21 02:42:50.000000000 +0300
@@ -41,11 +41,15 @@
return 1 # Isn't started
fi
else
- # Try discovering if nagios is alive checking its pid
- if kill -CHLD $( cat /var/run/nagios/$NAME.pid ) ; then
- return 1 # Isn't started
- else
- return 0 # Is started
+ if [ -f "/var/run/nagios/$NAME.pid" ]; then
+ # Try discovering if nagios is alive checking its pid
+ if kill -CHLD $( cat /var/run/nagios/$NAME.pid ) ; then
+ return 1 # Isn't started
+ else
+ return 0 # Is started
+ fi
+ else
+ return 1 # Isn't started
fi
fi
}
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.5
Locale: LANG=C, LC_CTYPE=C
--
To UNSU