X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=contrib%2Fsystemd.collectd.service;h=0e758e40ef85a9fb6aba1c921da5a0f27c89a41d;hb=749b03b3fc459895b7415c7c13753066bf0af55b;hp=96df8a576a694670f1af076e344b0be7f1c45767;hpb=d6f0273b2ebae6995d69c7701838825b96e4f424;p=collectd.git diff --git a/contrib/systemd.collectd.service b/contrib/systemd.collectd.service index 96df8a57..0e758e40 100644 --- a/contrib/systemd.collectd.service +++ b/contrib/systemd.collectd.service @@ -7,19 +7,24 @@ Requires=local-fs.target network.target ExecStart=/usr/sbin/collectd EnvironmentFile=-/etc/sysconfig/collectd EnvironmentFile=-/etc/default/collectd +ProtectSystem=full +ProtectHome=true + +# drop all capabilities: +CapabilityBoundingSet= +# use this instead if you use the dns or ping plugin +#CapabilityBoundingSet=CAP_NET_RAW +# turn this on if you use the iptables next to the dns or ping plugin +#CapabilityBoundingSet=CAP_NET_RAW CAP_NET_ADMIN + +NoNewPrivileges=true # 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 +Restart=on-failure [Install] WantedBy=multi-user.target