[packages/diamond: 2/2] Added service stuff. Release 1. Works for me.
matkor
matkor at pld-linux.org
Wed Dec 2 17:36:01 CET 2015
commit 8fceffddf4ee9e387072e82845d1dc37cee57c14
Author: Mateusz Korniak <matkor at pld-linux.org>
Date: Wed Dec 2 17:35:37 2015 +0100
Added service stuff. Release 1. Works for me.
diamond.spec | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/diamond.spec b/diamond.spec
index 98d35bd..b736469 100644
--- a/diamond.spec
+++ b/diamond.spec
@@ -10,7 +10,7 @@ Summary(pl.UTF-8): Demon napisany w Pythonie, zbierający statystyki i publikuj
# Name must match the python module/package name (as in 'import' statement)
Name: diamond
Version: 4.0.195
-Release: 0.5
+Release: 0.6
License: MIT
Group: Libraries/Python
# https://github.com/python-diamond/Diamond/archive/v4.0.tar.gz
@@ -118,11 +118,24 @@ rm -rf $RPM_BUILD_ROOT
%groupadd -g 327 diamond
%useradd -u 327 -d /var/log/diamond -g diamond -c "Diamond daemon user" diamond
+%post
+/sbin/chkconfig --add diamond
+## %systemd_post diamond.service
+
+%preun
+if [ "$1" = "0" ]; then
+ %service diamond stop
+ /sbin/chkconfig --del diamond
+fi
+%systemd_preun diamond.service
+
%postun
if [ "$1" = "0" ]; then
%userremove diamond
%groupremove diamond
fi
+%systemd_reload
+
%if %{with python2}
%files
@@ -140,7 +153,6 @@ fi
%attr(750,diamond,diamond) /var/log/diamond
%attr(754,root,root) /etc/rc.d/init.d/diamond
-
%if "%{py_ver}" > "2.4"
%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/diamond.git/commitdiff/8fceffddf4ee9e387072e82845d1dc37cee57c14
More information about the pld-cvs-commit
mailing list