From: Marc Fournier Date: Wed, 19 Nov 2014 10:12:55 +0000 (+0100) Subject: add example systemd service file X-Git-Tag: collectd-5.5.0~141^2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=085aaee14323a69e6cd6d995440cccbc6521a759;p=collectd.git add example systemd service file Making use of systemd socket notification feature added in ff270e6d5. --- diff --git a/contrib/systemd.collectd.service b/contrib/systemd.collectd.service new file mode 100644 index 00000000..b046192b --- /dev/null +++ b/contrib/systemd.collectd.service @@ -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