From 81581f9719bc56f01d5aa08952671d65fda9867a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 May 2023 18:27:08 +0200 Subject: Merging upstream version 1.39.0. Signed-off-by: Daniel Baumann --- system/runit/run.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 system/runit/run.in (limited to 'system/runit/run.in') diff --git a/system/runit/run.in b/system/runit/run.in new file mode 100644 index 000000000..4ea783cc6 --- /dev/null +++ b/system/runit/run.in @@ -0,0 +1,16 @@ +#!/bin/sh + +piddir="@localstatedir_POST@/run/netdata/netdata.pid" +pidfile="${piddir}/netdata.pid" + +cachedir="@localstatedir_POST@/cache/netdata" + +command="@sbindir_POST@/netdata" +command_args="-P ${pidfile} -D" + +[ ! -d "${piddir}" ] && mkdir -p "${piddir}" +[ ! -d "${cachedir}" ] && mkdir -p "${cachedir}" +chown -R @netdata_user_POST@ "${piddir}" +chown -R @netdata_user_POST@ "${cachedir}" + +exec ${command} ${command_args} -- cgit v1.2.3