[beanstalkd] Update scriptlets with system macros

jjh jjh at fedoraproject.org
Mon Sep 9 00:38:38 UTC 2013


commit 7b9414a6ec79416cbb41bf78bd31246704fc1ab4
Author: Jeremy Hinegardner <jeremy at hinegardner.org>
Date:   Sun Sep 8 18:33:19 2013 -0600

    Update scriptlets with system macros

 beanstalkd.spec |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)
---
diff --git a/beanstalkd.spec b/beanstalkd.spec
index c54eafd..89f57ca 100644
--- a/beanstalkd.spec
+++ b/beanstalkd.spec
@@ -76,26 +76,15 @@ if [ -d %{beanstalkd_home} ]; then
         -o %{beanstalkd_user} -g %{beanstalkd_user} \
         %{beanstalkd_binlogdir}
 fi
-
-if [ $1 -eq 1 ] ; then
-    # Initial installation
-    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
-fi
+%systemd_preun %{name}.service
 
 
 %preun
-if [ $1 -eq 0 ] ; then
-    # Package removal, not upgrade
-    /bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
-    /bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
-fi
+%systemd_preun %{name}.service
+
 
 %postun
-/bin/systemctl daemon-reload >/dev/null 2>&1 || :
-if [ $1 -ge 1 ] ; then
-    # Package upgrade, not uninstall
-    /bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
-fi
+%systemd_postun_with_restart %{name}.service
 
 
 %files
@@ -111,6 +100,7 @@ fi
 
 %changelog
 * Sun Sep 08 2013 Jeremy Hinegardner <jeremy at hinegardner.org> - 1.9-1
+- update scriptlets with systemd macros (#850044) - from Václav Pavlín
 - add hardened build (#954331)
 - update to latests upstream
 


More information about the scm-commits mailing list