prometheanfire    14/12/14 23:33:24

  Modified:             icinga2.initd
  Log:
  final fix for the init I hope
  
  (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 
0x2471eb3e40ac5ac3)

Revision  Changes    Path
1.4                  net-analyzer/icinga2/files/icinga2.initd

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga2/files/icinga2.initd?rev=1.4&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga2/files/icinga2.initd?rev=1.4&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga2/files/icinga2.initd?r1=1.3&r2=1.4

Index: icinga2.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/icinga2/files/icinga2.initd,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- icinga2.initd       14 Dec 2014 23:27:21 -0000      1.3
+++ icinga2.initd       14 Dec 2014 23:33:24 -0000      1.4
@@ -20,8 +20,16 @@
        eend 1
     fi
 
-    ICINGA2_USER=`$DAEMON variable get --current RunAsUser`
-    ICINGA2_GROUP=`$DAEMON variable get --current RunAsGroup`
+    ICINGA2_USER=$($DAEMON variable get --current RunAsUser)
+    if [ $? != 0 ]; then
+        eerror "Could not fetch RunAsUser variable: '$ICINGA2_USER'."
+        return 1
+    fi
+    ICINGA2_GROUP=$($DAEMON variable get --current RunAsGroup)
+    if [ $? != 0 ]; then
+        eerror "Could not fetch RunAsGroup variable: '$ICINGA2_GROUP'."
+        return 1
+    fi
 
     checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_RUN_DIR
     checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_COMMAND_GROUP 
$ICINGA2_STATE_DIR




Reply via email to