summaryrefslogtreecommitdiffstats
path: root/system/netdata-freebsd.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-11-07 12:19:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-11-07 12:20:17 +0000
commita64a253794ac64cb40befee54db53bde17dd0d49 (patch)
treec1024acc5f6e508814b944d99f112259bb28b1be /system/netdata-freebsd.in
parentNew upstream version 1.10.0+dfsg (diff)
downloadnetdata-a64a253794ac64cb40befee54db53bde17dd0d49.tar.xz
netdata-a64a253794ac64cb40befee54db53bde17dd0d49.zip
New upstream version 1.11.0+dfsgupstream/1.11.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'system/netdata-freebsd.in')
-rw-r--r--system/netdata-freebsd.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/system/netdata-freebsd.in b/system/netdata-freebsd.in
index fac2e82c2..300ddc9ec 100644
--- a/system/netdata-freebsd.in
+++ b/system/netdata-freebsd.in
@@ -1,11 +1,13 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-3.0-or-later
. /etc/rc.subr
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}"
@@ -22,11 +24,13 @@ savedb_cmd="netdata_savedb"
netdata_prestart()
{
+ [ ! -d "${piddir}" ] && mkdir -p "${piddir}"
return 0
}
netdata_poststop()
{
+ [ -f "${pidfile}" ] && rm "${pidfile}"
return 0
}