summaryrefslogtreecommitdiff
path: root/network/nagios/default-init.in.diff
blob: f1b3bf83738b3b3c11398424955887d980b5d52b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- nagios-4.4.6/startup/default-init.in.orig	2020-04-28 22:48:29.000000000 +0200
+++ nagios-4.4.6/startup/default-init.in	2021-07-31 23:32:21.895857400 +0200
@@ -180,6 +180,10 @@
 
 		check_config
 
+		NagiosRunDir=`dirname $NagiosRunFile`
+		mkdir -p $NagiosRunDir
+		chown $NagiosUser:$NagiosGroup $NagiosRunDir
+
 		if test -f $NagiosRunFile; then
 			NagiosPID=`head -n 1 $NagiosRunFile`
 			if status_nagios; then