prometheanfire    15/03/11 04:43:21

  Modified:             icinga2.initd
  Log:
  bup
  
  (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 
0x33ED3FD25AFC78BA)

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

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

Index: icinga2.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/icinga2/files/icinga2.initd,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- icinga2.initd       13 Jan 2015 04:42:58 -0000      1.5
+++ icinga2.initd       11 Mar 2015 04:43:21 -0000      1.6
@@ -2,6 +2,8 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+extra_started_commands="reload"
+
 DAEMON="/usr/sbin/icinga2"
 ICINGA2_CONFIG_FILE="/etc/icinga2/icinga2.conf"
 ICINGA2_RUN_DIR="/run/icinga2"
@@ -32,11 +34,11 @@
     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
-    checkpath -d -m 2750 -o $ICINGA2_USER:$ICINGA2_COMMAND_GROUP 
$ICINGA2_CMD_DIR
+    checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_STATE_DIR
+    checkpath -d -m 2750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_CMD_DIR
 
     if ! $DAEMON daemon -c $ICINGA2_CONFIG_FILE -C > $ICINGA2_STARTUP_LOG 
2>&1; then
-        eerror "Icinga 2 detected configuration errors. Check 
'$ICINGA2_STARTUP_LOG' for details."
+        eerror "Icinga2 detected configuration errors. Check 
'$ICINGA2_STARTUP_LOG' for details."
         return 1
     fi
 }
@@ -64,3 +66,14 @@
         --progress
     eend $?
 }
+
+reload() {
+    ebegin "Checking icinga2 configuration"
+    "$DAEMON" daemon --validate >/dev/null 2>&1
+    if [ $? -ne 0 ]; then
+        eerror "Icinga2 detected configuration errors, run '$DAEMON daemon 
--validate' for details"
+        return 1
+    fi
+    ebegin "Reloading icinga2"
+    start-stop-daemon --signal HUP "$ICINGA2_PID_FILE"
+}




Reply via email to