From 875d24ee8ea37ebcfe8b1f8fdcd47f291378a190 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 2 Jul 2018 16:34:20 +0000 Subject: [PATCH] - (un)register system service --- shorewall.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) 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} -- 2.46.0