From c9cf7f6f289d5d23773d5e1a7ac9e4d8a197cac9 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Fri, 26 Dec 2014 02:07:08 +0100 Subject: fix files directive and systemd unit directive --- bin/updater/owncloud-news-updater.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/updater/owncloud-news-updater.spec b/bin/updater/owncloud-news-updater.spec index 52198efe5..72e95300e 100644 --- a/bin/updater/owncloud-news-updater.spec +++ b/bin/updater/owncloud-news-updater.spec @@ -31,14 +31,19 @@ mkdir -p /etc/owncloud/news install -D -m 0644 %{buildroot}/example-config.ini /etc/owncloud/news/updater.ini install -D -m 0644 %{buildroot}/systemd/owncloud-news-updater.service /etc/systemd/system/ +%pre +%service_add_pre %{name}.service + %post -systemctl enable owncloud-news-updater.service -systemctl start owncloud-news-updater.service +%service_add_post %{name}.service %preun -systemctl disable owncloud-news-updater.service -systemctl stop owncloud-news-updater.service +%service_del_preun %{name}.service + +%postun +%service_del_postun %{name}.service +%files %config %attr(0644,root,root) /etc/owncloud/news/updater.ini -- cgit v1.2.3