Commit 7f18274a authored by Maxime Hadjinlian's avatar Maxime Hadjinlian Committed by Thomas Petazzoni
Browse files

collectd: Add service file



The service file was taken from Debian.

Signed-off-by: default avatarMaxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 2511024c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -185,4 +185,12 @@ define COLLECTD_INSTALL_TARGET_CMDS
	rm -f $(TARGET_DIR)/usr/share/collectd/postgresql_default.conf
endef

define COLLECTD_INSTALL_INIT_SYSTEMD
	$(INSTALL) -D -m 644 package/collectd/collectd.service \
		$(TARGET_DIR)/usr/lib/systemd/system/collectd.service
	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
	ln -fs ../../../../usr/lib/systemd/system/collectd.service \
		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/collectd.service
endef

$(eval $(autotools-package))
+17 −0
Original line number Diff line number Diff line
[Unit]
Description=Statistics collection and monitoring daemon
After=local-fs.target network.target
Requires=local-fs.target network.target
ConditionPathExists=/etc/collectd.conf

[Service]
Type=notify
NotifyAccess=main
EnvironmentFile=-/etc/default/collectd
ExecStartPre=/usr/sbin/collectd -t
ExecStart=/usr/sbin/collectd
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target