From c18c6a621ea8f2550913029dcc1a2a3942346a6b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 5 Mar 2006 15:20:15 +0000 Subject: [PATCH] - use %service, adapterized, cosmetics Changed files: nagios-nrpe.spec -> 1.23 --- nagios-nrpe.spec | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/nagios-nrpe.spec b/nagios-nrpe.spec index 7d95fb2..9cd254d 100644 --- a/nagios-nrpe.spec +++ b/nagios-nrpe.spec @@ -12,7 +12,7 @@ URL: http://www.nagios.org/ BuildRequires: autoconf BuildRequires: automake BuildRequires: openssl-tools -BuildRequires: rpmbuild(macros) >= 1.202 +BuildRequires: rpmbuild(macros) >= 1.268 Requires(post,postun): /sbin/chkconfig Requires: nagios-common Requires: nagios-plugins @@ -82,15 +82,11 @@ rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add nrpe -if [ -f /var/lock/subsys/nrpe ]; then - /etc/rc.d/init.d/nrpe restart 1>&2 -fi +%service nrpe restart %preun if [ "$1" = "0" ] ; then - if [ -f /var/lock/subsys/nrpe ]; then - /etc/rc.d/init.d/nrpe stop 1>&2 - fi + %service nrpe stop /sbin/chkconfig --del nrpe fi -- 2.43.0