]> git.pld-linux.org Git - packages/apcupsd.git/commitdiff
- use %service
authordzeus <dzeus@pld-linux.org>
Fri, 17 Mar 2006 20:07:36 +0000 (20:07 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apcupsd.spec -> 1.74

apcupsd.spec

index f0fa12555231258b011d14ec4ddd95ba378d3721..7a1993df02ca1e679ee68b0c46446f213e9ca022 100644 (file)
@@ -23,13 +23,14 @@ URL:                http://www.apcupsd.com/
 BuildRequires: autoconf
 BuildRequires: automake
 %{?with_snmp:BuildRequires:    net-snmp-devel}
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post):        fileutils
 Requires(post,preun):  /sbin/chkconfig
 Requires:      rc-scripts
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/apcupsd
-%define         _cgidir        /home/services/httpd/cgi-bin
+%define                _cgidir         /home/services/httpd/cgi-bin
 
 %description
 UPS power management under Linux for APCC Products. It allows your
@@ -94,7 +95,7 @@ install -d $RPM_BUILD_ROOT/etc/{apcupsd,logrotate.d,rc.d/init.d,sysconfig} \
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
-
+        
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/apcupsd
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/apcupsd
 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/apcupsd
@@ -112,17 +113,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add apcupsd
-if [ -f /var/lock/subsys/apcupsd ]; then
-       /etc/rc.d/init.d/apcupsd restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/apcupsd start\" to start apcupsd daemon."
-fi
+%service apcupsd restart "apcupsd daemon"
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/apcupsd ]; then
-               /etc/rc.d/init.d/apcupsd stop >&2
-       fi
+       %service apcupsd stop
        /sbin/chkconfig --del apcupsd
 fi
 
This page took 0.167764 seconds and 4 git commands to generate.