diff options
Diffstat (limited to 'system/netdata-freebsd.in')
-rw-r--r-- | system/netdata-freebsd.in | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/system/netdata-freebsd.in b/system/netdata-freebsd.in index 15e858b8e8..501a8c697c 100644 --- a/system/netdata-freebsd.in +++ b/system/netdata-freebsd.in @@ -6,7 +6,8 @@ name=netdata rcvar=netdata_enable -pidfile="@localstatedir_POST@/run/netdata.pid" +piddir="@localstatedir_POST@/run/netdata" +pidfile="${pidfile}/netdata.pid" command="@sbindir_POST@/netdata" command_args="-P ${pidfile}" @@ -23,11 +24,13 @@ savedb_cmd="netdata_savedb" netdata_prestart() { + [ ! -d "${piddir}" ] && mkdir -p "${piddir}" return 0 } netdata_poststop() { + rm "${pidfile}" return 0 } |