]> git.pld-linux.org Git - packages/alarmwatch.git/commitdiff
- use %service
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 23 Mar 2006 19:37:37 +0000 (19:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    alarmwatch.spec -> 1.10

alarmwatch.spec

index d8d41c0455ac4c6c6d904bd8ec808f275851232c..1a172b1342f13464ffe63ca33e1d3f90b3b82c24 100644 (file)
@@ -11,9 +11,10 @@ Source1:     %{name}.init
 Source2:       %{name}.sysconfig
 URL:           http://www.azstarnet.com/~donut/programs/alarmwatch.html
 BuildRequires: autoconf
-Requires:      rc-scripts
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
 Requires:      lm_sensors
+Requires:      rc-scripts
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -32,7 +33,6 @@ kiedy nie ignorowany alarm jest aktywny.
 %build
 %{__autoconf}
 %configure
-
 %{__make}
 
 %install
@@ -52,18 +52,14 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add alarmwatch
-if [ -f /var/lock/subsys/alarmwatch ]; then
-       /etc/rc.d/init.d/gpm alarmwatch >&2
-else
-       echo "Run \"/etc/rc.d/init.d/alarmwatch start\" to start alarmwatch daemon."
+%service alarmwatch restart "alarmwatch daemon"
+if [ "$1" = 1 ]; then
        echo "Remember to configure it first!"
 fi
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/alarmwatch ]; then
-               /etc/rc.d/init.d/alarmwatch stop >&2
-       fi
+       %service alarmwatch stop
        /sbin/chkconfig --del alarmwatch
 fi
 
This page took 0.066435 seconds and 4 git commands to generate.