diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2018-09-11 19:02:10 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2018-09-11 19:02:10 +0300 |
commit | d8ef6e00956b76e28b16f7bb30d5747d2968d0d8 (patch) | |
tree | d41ca89396db683249ce302aa36597888a250387 /system/netdata-freebsd.in | |
parent | 0d6cc1a67470d4c39ec799218dfc43a1f92e6867 (diff) |
all startup files use the same pid file; all startup files remove pid file on exit
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 } |