run.in 283 B

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