From: Marcin Krol Date: Mon, 2 Jul 2018 16:34:20 +0000 (+0000) Subject: - (un)register system service X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=875d24ee8ea37ebcfe8b1f8fdcd47f291378a190;p=packages%2Fshorewall.git - (un)register system service --- diff --git a/shorewall.spec b/shorewall.spec index f642565..caf7dab 100644 --- a/shorewall.spec +++ b/shorewall.spec @@ -170,6 +170,16 @@ install -p %{SOURCE10} $RPM_BUILD_ROOT/etc/rc.d/init.d/shorewall %clean rm -rf $RPM_BUILD_ROOT +%post +/sbin/chkconfig --add shorewall +%service shorewall restart "Shorewall" + +%preun +if [ "$1" = "0" ]; then + %service shorewall stop + /sbin/chkconfig --del shorewall +fi + %files %defattr(644,root,root,755) %doc shorewall-%{version}/{COPYING,changelog.txt,releasenotes.txt,Samples}