Code

Imported Upstream version 5.5.0
[pkg-collectd.git] / contrib / systemd.collectd.service
diff --git a/contrib/systemd.collectd.service b/contrib/systemd.collectd.service
new file mode 100644 (file)
index 0000000..b046192
--- /dev/null
@@ -0,0 +1,23 @@
+[Unit]
+Description=Collectd
+After=local-fs.target network.target
+Requires=local-fs.target network.target
+
+[Service]
+ExecStart=/usr/sbin/collectd
+
+# Tell systemd it will receive a notification from collectd over it's control
+# socket once the daemon is ready. See systemd.service(5) for more details.
+Type=notify
+NotifyAccess=main
+
+# Restart the collectd daemon after a 10 seconds delay, in case it crashes.
+Restart=always
+RestartSec=10
+
+# Send all console messages to syslog.
+StandardOutput=syslog
+StandardError=syslog
+
+[Install]
+WantedBy=multi-user.target