]> git.pld-linux.org Git - packages/eximstate.git/commitdiff
- use %service, fixed scripts, rel 3
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 27 Feb 2006 23:01:30 +0000 (23:01 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    eximstate.spec -> 1.17

eximstate.spec

index f37419d7e554bfa6e5b3b2c7c4ca75e9fdf4387d..f13d9bf1bcbf603df8ea8b10d034e81b35bd1967 100644 (file)
@@ -2,7 +2,7 @@ Summary:        Monitoring exim installations
 Summary(pl):   Monitorowanie instalacji exima
 Name:          eximstate
 Version:       1.1
-Release:       2
+Release:       3
 License:       GPL
 Group:         Applications/Mail
 Source0:       http://www.olliecook.net/projects/eximstate/releases/%{name}-%{version}.tar.gz
@@ -14,6 +14,7 @@ Source4:      %{name}d.sysconfig
 Patch0:                %{name}-debug.patch
 URL:           http://www.olliecook.net/projects/eximstate/
 BuildRequires: ncurses-devel
+BuildRequires: rpmbuild(macros) >= 1.268
 BuildRequires: rrdtool-devel >= 1.2.10
 Requires(post,preun):  /sbin/chkconfig
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -86,32 +87,27 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add %{name}d
-if [ -f %{_var}/lock/subsys/%{name}d ]; then
-       /etc/rc.d/init.d/%{name}d restart 1>&2
-else
-       echo "Run \"/usr/sbin/makenewrrd.sh <host>\" for each your monitored host."
-       echo "Run \"/etc/rc.d/init.d/%{name}d start\" to start %{name}d daemon."
+if [ "$1" = 1 ]; then
+       echo "Run \"%{_sbindir}/makenewrrd.sh <host>\" for each your monitored host."
 fi
+%service %{name}d restart "%{name}d daemon"
 
 %preun
-if [ "$1" = "0" -a -f %{_var}/lock/subsys/%{name}d ]; then
-       /etc/rc.d/init.d/%{name}d stop 1>&2
+if [ "$1" = "0" ]; then
+       %service %{name}d stop
+       /sbin/chkconfig --del %{name}d
 fi
-/sbin/chkconfig --del %{name}d
 
 %post client
 /sbin/chkconfig --add %{name}
-if [ -f %{_var}/lock/subsys/%{name} ]; then
-       /etc/rc.d/init.d/%{name} restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
-fi
+%service %{name} restart "%{name} daemon"
 
 %preun client
-if [ "$1" = "0" -a -f %{_var}/lock/subsys/%{name} ]; then
+if [ "$1" = "0" ]; then
        /etc/rc.d/init.d/%{name} stop 1>&2
+       %service %{name} stop
+       /sbin/chkconfig --del %{name}
 fi
-/sbin/chkconfig --del %{name}
 
 %files
 %defattr(644,root,root,755)
This page took 0.076339 seconds and 4 git commands to generate.