| 1 | #!/bin/sh |
| 2 | |
| 3 | piddir="@localstatedir_POST@/run/netdata/netdata.pid" |
| 4 | pidfile="${piddir}/netdata.pid" |
| 5 | |
| 6 | command="@sbindir_POST@/netdata" |
| 7 | command_args="-P ${pidfile} -D" |
| 8 | |
| 9 | [ ! -d "${piddir}" ] && mkdir -p "${piddir}" |
| 10 | chown -R @netdata_user_POST@ "${piddir}" |
| 11 | |
| 12 | exec ${command} ${command_args} |