summaryrefslogtreecommitdiffstats
path: root/abrt.spec.in
diff options
context:
space:
mode:
authorMiroslav Lichvar <mlichvar@redhat.com>2011-06-09 16:37:30 +0200
committerMiroslav Lichvar <mlichvar@redhat.com>2011-06-09 17:05:35 +0200
commitffbc6920a332db496dd633f3b7dec944c10d12bf (patch)
tree3dbfcf7f57928ba56835cecdc86cdf891bc5aeaf /abrt.spec.in
parentaa851e935485de31e3c1008756fdd85deef5bb88 (diff)
downloadabrt-ffbc6920a332db496dd633f3b7dec944c10d12bf.zip
abrt-ffbc6920a332db496dd633f3b7dec944c10d12bf.tar.gz
abrt-ffbc6920a332db496dd633f3b7dec944c10d12bf.tar.xz
add abrt-ccpp systemd service (trac#288)
Diffstat (limited to 'abrt.spec.in')
-rw-r--r--abrt.spec.in18
1 files changed, 15 insertions, 3 deletions
diff --git a/abrt.spec.in b/abrt.spec.in
index 3d9dd0d..c0e58f5 100644
--- a/abrt.spec.in
+++ b/abrt.spec.in
@@ -275,7 +275,13 @@ chown -R abrt:abrt %{_localstatedir}/cache/abrt-di
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add abrt-ccpp
fi
-#systemd: TODO
+#systemd
+%if %{?with_systemd}
+if [ $1 -eq 1 ]; then
+ # Enable (but don't start) the units by default
+ /bin/systemctl enable abrt-ccpp.service >/dev/null 2>&1 || :
+fi
+%endif
%post addon-kerneloops
if [ $1 -eq 1 ]; then
@@ -307,8 +313,8 @@ if [ "$1" -eq "0" ] ; then
service abrt-ccpp stop >/dev/null 2>&1
/sbin/chkconfig --del abrt-ccpp
fi
-#systemd (not tested):
-%if 0
+#systemd
+%if %{?with_systemd}
if [ "$1" -eq "0" ] ; then
/bin/systemctl --no-reload disable abrt-ccpp.service >/dev/null 2>&1 || :
/bin/systemctl stop abrt-ccpp.service >/dev/null 2>&1 || :
@@ -335,6 +341,9 @@ fi
%postun addon-kerneloops
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+%postun addon-ccpp
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+
%endif
%post gui
@@ -432,6 +441,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/%{name}/plugins/CCpp.conf
%dir %attr(0775, abrt, abrt) %{_localstatedir}/cache/abrt-di
+%if %{?with_systemd}
+/lib/systemd/system/abrt-ccpp.service
+%endif
%{_initrddir}/abrt-ccpp
%{_libexecdir}/abrt-hook-ccpp
%{_bindir}/abrt-action-analyze-c