[packages/nagios-nrpe] use common pidfile for status and stop

glen glen at pld-linux.org
Thu Feb 4 09:59:32 CET 2016


commit 1527661b1bf027c6b90fb5456568b33d9b518d25
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Feb 4 10:59:26 2016 +0200

    use common pidfile for status and stop

 nagios-nrpe.spec | 4 ++--
 nrpe.init        | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/nagios-nrpe.spec b/nagios-nrpe.spec
index 38434ef..689d501 100644
--- a/nagios-nrpe.spec
+++ b/nagios-nrpe.spec
@@ -2,7 +2,7 @@ Summary:	Nagios remote plugin execution service/plugin
 Summary(pl.UTF-8):	Demon i wtyczka zdalnego wywoływania wtyczek Nagios
 Name:		nagios-nrpe
 Version:	2.15
-Release:	6
+Release:	7
 License:	GPL v2
 Group:		Networking
 Source0:	http://downloads.sourceforge.net/nagios/nrpe-%{version}.tar.gz
@@ -20,7 +20,7 @@ BuildRequires:	openssl-tools
 BuildRequires:	rpmbuild(macros) >= 1.647
 Requires(post,preun):	/sbin/chkconfig
 Requires:	nagios-common
-Requires:	rc-scripts
+Requires:	rc-scripts >= 0.4.1.26
 Provides:	nagios-core
 Obsoletes:	netsaint-nrpe
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
diff --git a/nrpe.init b/nrpe.init
index 3161c73..4cba6ef 100755
--- a/nrpe.init
+++ b/nrpe.init
@@ -27,6 +27,8 @@ else
 	exit 0
 fi
 
+pidfile=/var/run/nrpe/nrpe.pid
+
 start() {
 	if [ -f /var/lock/subsys/nrpe ]; then
 		msg_already_running "Nagios NRPE daemon"
@@ -46,7 +48,7 @@ stop() {
 	fi
 
 	msg_stopping "Nagios NRPE daemon"
-	killproc --pidfile nrpe/nrpe.pid nrpe
+	killproc --pidfile $pidfile nrpe
 	rm -f /var/lock/subsys/nrpe
 }
 
@@ -80,7 +82,7 @@ case "$1" in
 	condrestart 7
 	;;
   status)
-	status nrpe
+	status --pidfile $pidfile nrpe
 	exit $?
 	;;
   *)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios-nrpe.git/commitdiff/1527661b1bf027c6b90fb5456568b33d9b518d25



More information about the pld-cvs-commit mailing list