[packages/gearmand] correct scriptlets

glen glen at pld-linux.org
Wed Jan 27 22:48:58 CET 2016


commit 7d24d356920ab509d8aa8041851f9286d29b7dbd
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Jan 27 23:48:43 2016 +0200

    correct scriptlets

 gearmand.spec | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/gearmand.spec b/gearmand.spec
index 68c1b20..a46c950 100644
--- a/gearmand.spec
+++ b/gearmand.spec
@@ -149,26 +149,21 @@ rm -rf $RPM_BUILD_ROOT
 %groupadd -g 328 gearmand
 %useradd -u 328 -g gearmand -d / -s /sbin/nologin -c "Gearmand job server" gearmand
 
-%if 0
 %post
+test -e /var/log/gearmand.log || touch /var/log/gearmand.log
+/sbin/chkconfig --add gearmand
+%service gearmand restart
 %systemd_post gearmand.service
-if [ $1 = 1 ]; then
-	/sbin/chkconfig --add gearmand
-fi
-touch /var/log/gearmand.log
 
 %preun
-%systemd_preun gearmand.service
 if [ "$1" = 0 ] ; then
 	%service gearmand stop
 	/sbin/chkconfig --del gearmand
 fi
+%systemd_preun gearmand.service
 
 %postun
-%systemd_postun_with_restart gearmand.service
-%endif
-
-%postun
+%systemd_reload
 if [ "$1" = "0" ]; then
 	%userremove gearmand
 	%groupremove gearmand
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gearmand.git/commitdiff/7d24d356920ab509d8aa8041851f9286d29b7dbd



More information about the pld-cvs-commit mailing list