From: Michael Tremer Date: Tue, 21 Aug 2012 17:38:06 +0000 (+0000) Subject: Add systemd unit file. X-Git-Tag: 0.0.2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9af02219d3e485976c2dffebfd790e9782ee5c51;p=telemetry.git Add systemd unit file. --- diff --git a/Makefile b/Makefile index 3c0defa..54d8c63 100644 --- 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 index 0000000..ac4a893 --- /dev/null +++ b/collecty.service @@ -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