]> git.pld-linux.org Git - packages/nagios.git/commitdiff
- use --pidfile when reporting status or reloading, so nagios child processes do...
authorElan Ruusamäe <glen@delfi.ee>
Wed, 5 Dec 2012 20:56:16 +0000 (22:56 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Wed, 5 Dec 2012 20:56:16 +0000 (22:56 +0200)
nagios.init [changed mode: 0644->0755]
nagios.spec

old mode 100644 (file)
new mode 100755 (executable)
index d9d0a18..cf6348f
@@ -30,6 +30,10 @@ cfg_file=/etc/nagios/nagios.cfg
 # check for precache
 precached_object_file=$(awk -F= '/^precached_object_file/{print $2}' $cfg_file)
 
+# nagios pid file
+pid_file=$(awk -F= '/^lock_file/{print $2}' $cfg_file)
+pid_file=${pid_file:-/var/lib/nagios/nagios.pid}
+
 # configtest itself
 configtest() {
        /usr/sbin/nagios ${precached_object_file:+-p} -v $cfg_file
@@ -94,7 +98,7 @@ stop() {
        fi
 
        msg_stopping "Nagios"
-       killproc nagios -TERM
+       killproc --pidfile $pid_file nagios
        rm -f /var/lock/subsys/nagios > /dev/null 2>&1
 }
 
@@ -109,7 +113,7 @@ reload() {
        msg_reloading "Nagios"
 
        # NOTE: precached object file is created in configtest.
-       killproc nagios -HUP
+       killproc --pidfile $pid_file nagios -HUP
        RETVAL=$?
 }
 
@@ -149,7 +153,7 @@ case "$1" in
        checkconfig 1
        ;;
   status)
-       status nagios
+       status --pidfile $pid_file nagios
        RETVAL=$?
        ;;
 *)
index 0955580a51cbc9296d8cff00551bfcd22f428ba4..085e7cb9c350cf245b176197013944b16bc2319f 100644 (file)
@@ -28,7 +28,7 @@ Source6:      http://www.google.com/mapfiles/shadow50.png
 Source7:       http://www.google.com/mapfiles/marker.png
 # Source7-md5: edefef4bdfc29e1c953694651f05b466
 Source8:       googlemap.js
-Source9:       nagioswall.php
+Source9:       %{name}wall.php
 Patch0:                %{name}-resources.patch
 Patch1:                %{name}-iconv-in-libc.patch
 Patch2:                %{name}-webapps.patch
@@ -57,7 +57,7 @@ BuildRequires:        perl-Test-WWW-Mechanize-CGI
 %endif
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name}-common = %{version}-%{release}
-Requires:      rc-scripts
+Requires:      rc-scripts >= 0.4.5.5
 Requires:      sh-utils
 Suggests:      nagios-notify >= 0.13
 Suggests:      nagios-plugin-check_load
This page took 0.181983 seconds and 4 git commands to generate.