[packages/swatch] Forgot systemd %post/pre scripts

mmazur mmazur at pld-linux.org
Thu Feb 5 16:49:06 CET 2015


commit dec3f6674a69684573bcd1042fca4af02ebff7a0
Author: Mariusz Mazur <mmazur at axeos.com>
Date:   Thu Feb 5 15:48:47 2015 +0000

    Forgot systemd %post/pre scripts

 swatch.spec | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/swatch.spec b/swatch.spec
index 5565dc9..fafd589 100644
--- a/swatch.spec
+++ b/swatch.spec
@@ -83,6 +83,19 @@ rm -f $RPM_BUILD_ROOT{%{perl_archlib}/perllocal.pod,%{perl_vendorarch}/auto/swat
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+%service swatch restart
+%systemd_post swatch.target
+
+%preun
+if [ "$1" = "0" ]; then
+    %service swatch stop
+fi
+%systemd_preun swatch.target
+
+%postun
+%systemd_reload
+
 %files
 %defattr(644,root,root,755)
 %doc CHANGES COPYRIGHT KNOWN_BUGS README examples
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/swatch.git/commitdiff/dec3f6674a69684573bcd1042fca4af02ebff7a0



More information about the pld-cvs-commit mailing list