From 7d24d356920ab509d8aa8041851f9286d29b7dbd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 27 Jan 2016 23:48:43 +0200 Subject: [PATCH] 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 -- 2.43.0