summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorpavel <pavel.github@outlook.com>2016-04-08 22:45:33 -0400
committerpavel <pavel.github@outlook.com>2016-04-08 22:45:33 -0400
commite04d8e37a757e75968770ea5b1a158c61f6e2392 (patch)
tree98b3e6491c42f6ed48a7c37d08eefeba991305f4 /system
parent3bf22281bcdb6d937d454607ba3b603d0f589b61 (diff)
Added preparation scripts in systemd unit file
Diffstat (limited to 'system')
-rw-r--r--system/netdata.service.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/system/netdata.service.in b/system/netdata.service.in
index 91e45a7463..6adea5d343 100644
--- a/system/netdata.service.in
+++ b/system/netdata.service.in
@@ -8,6 +8,8 @@ WorkingDirectory=/tmp
User=root
Group=root
PIDFile=@localstatedir_POST@/run/netdata/netdata.pid
+ExecStartPre=/usr/bin/mkdir -p @localstatedir_POST@/run/netdata
+ExecStartPre=/usr/bin/chown -R netdata:netdata @localstatedir_POST@/run/netdata
ExecStart=@sbindir_POST@/netdata -pidfile @localstatedir_POST@/run/netdata/netdata.pid
ExecStop=/bin/kill -SIGTERM $MAINPID
TimeoutStopSec=30