]> git.pld-linux.org Git - packages/apmd.git/blobdiff - apmd.spec
- use %service
[packages/apmd.git] / apmd.spec
index 9eff2f9a02bc68ad5b08cbb12a22da538cceb771..52eda438b9612f276300cea28ab8564464f4293c 100644 (file)
--- a/apmd.spec
+++ b/apmd.spec
@@ -30,6 +30,7 @@ Source1:      %{name}.init
 URL:           http://www.worldvisions.ca/~apenwarr/apmd/
 BuildRequires: XFree86-devel
 BuildRequires: libtool
+BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: sed >= 4.0
 Requires(post,preun):  /sbin/chkconfig
 Requires:      %{name}-libs = %{epoch}:%{version}-%{release}
@@ -276,17 +277,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add apmd
-if [ -f /var/lock/subsys/apmd ]; then
-       /etc/rc.d/init.d/apmd restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/apmd start\" to start apmd daemon."
-fi
+%service apmd restart "apmd daemon"
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/apmd ]; then
-               /etc/rc.d/init.d/apmd stop 1>&2
-       fi
+       %service apmd stop
        /sbin/chkconfig --del apmd
 fi
 
This page took 0.042437 seconds and 4 git commands to generate.