summaryrefslogtreecommitdiffstats
path: root/system/runit/run.in
blob: d7f39fb69a81005a32b6905ed01c1e8f039e72e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

piddir="@localstatedir_POST@/run/netdata/netdata.pid"
pidfile="${piddir}/netdata.pid"

command="@sbindir_POST@/netdata"
command_args="-P ${pidfile} -D"

[ ! -d "${piddir}" ] && mkdir -p "${piddir}"
chown -R @netdata_user_POST@ "${piddir}"

exec ${command} ${command_args}