]> TLD Linux GIT Repositories - packages/shorewall.git/commitdiff
- (un)register system service
authorMarcin Krol <hawk@tld-linux.org>
Mon, 2 Jul 2018 16:34:20 +0000 (16:34 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 2 Jul 2018 16:34:20 +0000 (16:34 +0000)
shorewall.spec

index f6425655d90cf7f578febde9508195858a089519..caf7dabfde0b7b9c56ce29a0e85aaf2cfcfa6047 100644 (file)
@@ -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}