]> git.pld-linux.org Git - packages/dchub.git/commitdiff
- use %service
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 26 Jul 2006 15:44:00 +0000 (15:44 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dchub.spec -> 1.27

dchub.spec

index e11047d73fe4880f3e202ebf612d5283ed7def97..85887e7aa79a28766a36383e60929e8b3a120693 100644 (file)
@@ -20,6 +20,7 @@ BuildRequires:        libxml2-devel
 BuildRequires: perl-devel
 BuildRequires: pkgconfig
 BuildRequires: python-devel
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
 Requires:      perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION')
 Requires:      perl-Locale-gettext
@@ -67,21 +68,13 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/scripts/po
 rm -rf $RPM_BUILD_ROOT
 
 %post
-if [ "$1" = "1" ]; then
-       /sbin/chkconfig --add dchub
-fi
-if [ -f /var/lock/subsys/dchub ]; then
-       /etc/rc.d/init.d/dchub restart >&2
-else
-       echo "Run /etc/rc.d/init.d/dchub start to start dchub daemon"
-fi
+/sbin/chkconfig --add dchub
+%service dchub restart
 
 %preun
 if [ "$1" = "0" ]; then
        /sbin/chkconfig --del dchub
-       if [ -f /var/lock/subsys/dchub ]; then
-               /etc/rc.d/init.d/dchub stop >&2
-       fi
+       %service dchub stop
 fi
 
 %files
This page took 0.103892 seconds and 4 git commands to generate.