]> arthur.barton.de Git - netdata.git/blobdiff - system/netdata-openrc.in
PID file fixes (systemd, openrc)
[netdata.git] / system / netdata-openrc.in
index 06bb7ffb20dcd9e7fde31c86cddb4125ea1251af..3b747fcba149942eafd306904534ee9809f12467 100755 (executable)
@@ -36,6 +36,11 @@ depend() {
        checkpath -o ${NETDATA_OWNER} -d @localstatedir_POST@/cache/netdata /run/netdata
 }
 
+start_pre() {
+       piddir=$(dirname ${pidfile})
+       mkdir -p ${piddir}
+}
+
 start_post() {
        if [[ ! -f @sysconfdir_POST@/netdata/netdata.conf ]]; then
                ebegin "Downloading default configuration to @sysconfdir_POST@/netdata/netdata.conf"