From 085aaee14323a69e6cd6d995440cccbc6521a759 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Wed, 19 Nov 2014 11:12:55 +0100 Subject: [PATCH] add example systemd service file Making use of systemd socket notification feature added in ff270e6d5. --- contrib/systemd.collectd.service | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 contrib/systemd.collectd.service 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 -- 2.30.2