commit f0351dc9ad5eed397b2087cd781ac85b014f4f60 Author: Nathanael D. Noblet <nathanael@xxxxxxx> Date: Thu Oct 11 11:07:03 2012 -0600 Use systemd scriptlets dspam.spec | 18 +++--------------- 1 files changed, 3 insertions(+), 15 deletions(-) --- diff --git a/dspam.spec b/dspam.spec index c79f9e1..2d66943 100644 --- a/dspam.spec +++ b/dspam.spec @@ -263,25 +263,13 @@ done %{__install} -Dp -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/ %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post dspam.service %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable dspam.service > /dev/null 2>&1 || : - /bin/systemctl stop dspam.service > /dev/null 2>&1 || : -fi +%systemd_preun dspam.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - /sbin/chkconfig --del httpd >/dev/null 2>&1 || : - # Package upgrade, not uninstall - /bin/systemctl try-restart dspam.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart dspam.service %pre libs getent group %{dspam_user} >/dev/null || groupadd -r %{dspam_user} -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel