summaryrefslogtreecommitdiffstats
path: root/system/netdata-lsb.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-11-07 12:22:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-11-07 12:22:44 +0000
commit1e6c93250172946eeb38e94a92a1fd12c9d3011e (patch)
tree8ca5e16dfc7ad6b3bf2738ca0a48408a950f8f7e /system/netdata-lsb.in
parentUpdate watch file (diff)
downloadnetdata-1e6c93250172946eeb38e94a92a1fd12c9d3011e.tar.xz
netdata-1e6c93250172946eeb38e94a92a1fd12c9d3011e.zip
Merging upstream version 1.11.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'system/netdata-lsb.in')
-rw-r--r--system/netdata-lsb.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/system/netdata-lsb.in b/system/netdata-lsb.in
index 3bbde1a49..e623f1e0c 100644
--- a/system/netdata-lsb.in
+++ b/system/netdata-lsb.in
@@ -1,4 +1,5 @@
#!/bin/bash
+# SPDX-License-Identifier: GPL-3.0-or-later
#
### BEGIN INIT INFO
# Provides: netdata
@@ -19,7 +20,8 @@ ${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
DAEMON="netdata"
DAEMON_PATH=@sbindir_POST@
-PIDFILE=@localstatedir_POST@/run/$DAEMON.pid
+PIDFILE_PATH=@localstatedir_POST@/run/netdata
+PIDFILE=$PIDFILE_PATH/$DAEMON.pid
DAEMONOPTS="-P $PIDFILE"
test -x $DAEMON_PATH/$DAEMON || exit 0
@@ -31,6 +33,10 @@ cd /
umask 022
service_start() {
+ if [ ! -d $PIDFILE_PATH ]; then
+ mkdir -p $PIDFILE_PATH
+ fi
+
log_daemon_msg "Starting real-time performance monitoring" "netdata"
start_daemon -p $PIDFILE $DAEMON_PATH/$DAEMON $DAEMONOPTS
RETVAL=$?