prometheanfire    14/12/09 02:50:06

  Added:                icinga2.initd icinga2.confd
  Log:
  multiple fixes :D bug 528962 and bug 528946
  
  fixing bugs 528962 528946
  Thanks florian for the init scripts
  
  (Portage version: 2.2.8-r2/cvs/Linux x86_64, signed Manifest commit with key 
0x2471eb3e40ac5ac3)

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

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

Index: icinga2.initd
===================================================================
#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

DAEMON=/usr/sbin/icinga2
ICINGA2_CONFIG_FILE=/etc/icinga2/icinga2.conf
ICINGA2_RUN_DIR=/var/run
ICINGA2_STATE_DIR=/var
ICINGA2_PID_FILE="${ICINGA2_RUN_DIR}/icinga2/icinga2.pid"
ICINGA2_DAEMON_ARGS="
-c $ICINGA2_CONFIG_FILE \
-e $ICINGA2_ERROR_LOG \
-u $ICINGA2_USER \
-g $ICINGA2_GROUP \
-d
"

depend() {
    need net
}

checkconfig() {
    if [ ! -e "$ICINGA2_CONFIG_FILE" ]; then
       ewarn "Config file '$ICINGA2_CONFIG_FILE' does not exist."
       eend 1
    fi
}

start() {
    checkconfig
    ebegin "Starting icinga2"
    $DAEMON $ICINGA2_DAEMON_ARGS > $ICINGA2_STARTUP_LOG 2>&1
    local retval=$?
    if [ $retval -ne 0 ]; then
        ewarn "Error starting icinga2. '$ICINGA2_STARTUP_LOG' for details."
    fi
    eend $retval
}

stop() {
    ebegin "Stopping icinga2"
    start-stop-daemon \
        --stop \
        --pidfile $ICINGA2_PID_FILE \
        --retry "SIGTERM/15 SIGKILL/30" \
        --progress
    eend $?
}

status() {
    [ ! -f "$ICINGA2_PID_FILE" ] && return 1

    if ps -p $(cat "$ICINGA2_PID_FILE") > /dev/null; then
        eend 0
    else
        eend 1
    fi
}




1.1                  net-analyzer/icinga2/files/icinga2.confd

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga2/files/icinga2.confd?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga2/files/icinga2.confd?rev=1.1&content-type=text/plain

Index: icinga2.confd
===================================================================
ICINGA2_ERROR_LOG=/var/log/icinga2/error.log
ICINGA2_STARTUP_LOG=/var/log/icinga2/startup.log
ICINGA2_LOG=/var/log/icinga2/icinga2.log

ICINGA2_USER=icinga
ICINGA2_GROUP=icingacmd

ICINGA2_COMMAND_USER=icinga
ICINGA2_COMMAND_GROUP=icingacmd




Reply via email to