0
0
mirror of https://github.com/openwrt/packages.git synced 2025-01-31 04:51:44 +00:00
packages/admin/netdata/files/netdata.init
James White cf9d5a8870 netdata: Update init script to use -D rather than -nd
The current init script is using the deprecated -nd flag. This updates netdata to be started with -D.

Signed-off-by: James White <james@jmwhite.co.uk>
2022-01-13 10:39:08 +01:00

22 lines
492 B
Bash

#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
APPBINARY=/usr/sbin/netdata
CONFIGFILE=/etc/netdata/netdata.conf
start_service() {
mkdir -m 0755 -p /var/cache/netdata
chown nobody /var/cache/netdata
mkdir -m 0755 -p /var/lib/netdata
chown nobody /var/lib/netdata
mkdir -m 0755 -p /var/log/netdata
chown nobody /var/log/netdata
procd_open_instance
procd_set_param command $APPBINARY -D -c $CONFIGFILE
procd_set_param file $CONFIGFILE
procd_set_param respawn
procd_close_instance
}