1
0

netdata.init 495 B

123456789101112131415161718192021
  1. #!/bin/sh /etc/rc.common
  2. START=99
  3. USE_PROCD=1
  4. APPBINARY=/usr/sbin/netdata
  5. CONFIGFILE=/etc/netdata/netdata.conf
  6. start_service() {
  7. mkdir -m 0755 -p /var/cache/netdata
  8. chown nobody /var/cache/netdata
  9. mkdir -m 0755 -p /var/lib/netdata
  10. chown nobody /var/lib/netdata
  11. mkdir -m 0755 -p /var/log/netdata
  12. chown nobody /var/log/netdata
  13. procd_open_instance
  14. procd_set_param command $APPBINARY -nd -c $CONFIGFILE
  15. procd_set_param file $CONFIGFILE
  16. procd_set_param respawn
  17. procd_close_instance
  18. }