]> git.ipfire.org Git - collecty.git/commitdiff
Add systemd unit file.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Aug 2012 17:38:06 +0000 (17:38 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Aug 2012 17:38:06 +0000 (17:38 +0000)
Makefile
collecty.service [new file with mode: 0644]

index 3c0defa6adf0dafaeddf04062788507044cc9fc6..54d8c631259160094f9dd0e948f218544adf2281 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,7 @@ DESTDIR    =
 PREFIX     = /usr
 BINDIR     = $(PREFIX)/bin
 LOCALEDIR  = $(PREFIX)/share/locale
+UNITDIR    = $(PREFIX)/lib/systemd/system
 
 PYTHON_VER := $(shell python -c "import platform; print '.'.join(platform.python_version_tuple()[:2])")
 PYTHON_DIR = $(DESTDIR)/usr/lib/python$(PYTHON_VER)/site-packages/
@@ -69,6 +70,10 @@ install: $(MO_FILES)
                        $(DESTDIR)$(LOCALEDIR)/$${lang}/LC_MESSAGES/$(PACKAGE_NAME).mo; \
        done
 
+       # Install systemd unit files.
+       mkdir -pv $(DESTDIR)$(UNITDIR)
+       install -m 644 -v collecty.service $(DESTDIR)$(UNITDIR)
+
 # Cleanup temporary files.
 .PHONY: clean
 clean:
diff --git a/collecty.service b/collecty.service
new file mode 100644 (file)
index 0000000..ac4a893
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=collecty - A system data collecting daemon
+
+[Service]
+ExecStart=/usr/bin/collectyd
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target