summaryrefslogtreecommitdiffstats
path: root/system/runit
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:57:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:57:58 +0000
commitbe1c7e50e1e8809ea56f2c9d472eccd8ffd73a97 (patch)
tree9754ff1ca740f6346cf8483ec915d4054bc5da2d /system/runit
parentInitial commit. (diff)
downloadnetdata-be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97.tar.xz
netdata-be1c7e50e1e8809ea56f2c9d472eccd8ffd73a97.zip
Adding upstream version 1.44.3.upstream/1.44.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'system/runit')
-rw-r--r--system/runit/run.in12
1 files changed, 12 insertions, 0 deletions
diff --git a/system/runit/run.in b/system/runit/run.in
new file mode 100644
index 00000000..d7f39fb6
--- /dev/null
+++ b/system/runit/run.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+piddir="@localstatedir_POST@/run/netdata/netdata.pid"
+pidfile="${piddir}/netdata.pid"
+
+command="@sbindir_POST@/netdata"
+command_args="-P ${pidfile} -D"
+
+[ ! -d "${piddir}" ] && mkdir -p "${piddir}"
+chown -R @netdata_user_POST@ "${piddir}"
+
+exec ${command} ${command_args}