summaryrefslogtreecommitdiffstats
path: root/bin/updater/Makefile
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-12-04 10:32:23 +0100
committerBernhard Posselt <dev@bernhard-posselt.com>2014-12-04 10:32:23 +0100
commit69624de11f8ec6c5fb59c6e099447d6644fb5d5a (patch)
treee96a53dd17a68eda5b9ed9531f129fae58a83b45 /bin/updater/Makefile
parent90ae9ae044f2505954374fd155890315a8bb64f8 (diff)
add systemd scripts for updater
Diffstat (limited to 'bin/updater/Makefile')
-rw-r--r--bin/updater/Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/bin/updater/Makefile b/bin/updater/Makefile
new file mode 100644
index 000000000..5e16847e7
--- /dev/null
+++ b/bin/updater/Makefile
@@ -0,0 +1,27 @@
+all: install
+
+install: install-systemd
+
+install-systemd:
+ mkdir -p /etc/owncloud/news
+
+ # install systemd unit file
+ cp $(CURDIR)/example-config.ini /etc/owncloud/news/updater.ini
+ cp $(CURDIR)/systemd/owncloud-news.service /etc/systemd/system/
+ python3 setup.py install
+
+ @echo "Installed files. Please edit your config in /etc/owncloud/news/updater.ini and run:"
+ @echo " systemctl enable owncloud-news"
+ @echo " systemctl start owncloud-news"
+ @echo "to run the updater on startup and:"
+ @echo " systemctl restart owncloud-news"
+ @echo "if you change the config in /etc/owncloud/news/updater.ini"
+
+make uninstall:
+ rm -rf /etc/owncloud/news
+ rm -rf /etc/systemd/systemd/owncloud-news.service
+ python3 setup.py uninstall
+
+ @echo "Uninstalled files. Please run: "
+ @echo " systemctl disable owncloud-news"
+ @echo "to remove it from boot" \ No newline at end of file