From 13a795722752324b9fd74df3570bde80ecb59d86 Mon Sep 17 00:00:00 2001 From: Francesco Colista Date: Wed, 27 Feb 2019 15:22:11 +0000 Subject: community/icinga2: updated initd --- community/icinga2/APKBUILD | 4 ++-- community/icinga2/icinga2.initd | 40 +++++++++++++++++++--------------------- 2 files changed, 21 insertions(+), 23 deletions(-) (limited to 'community/icinga2') diff --git a/community/icinga2/APKBUILD b/community/icinga2/APKBUILD index dda5a6d684..066bbad6bf 100644 --- a/community/icinga2/APKBUILD +++ b/community/icinga2/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Francesco Colista pkgname=icinga2 pkgver=2.10.3 -pkgrel=0 +pkgrel=1 pkgdesc="An open source host, service and network monitoring program" url="http://www.icinga.org" arch="all !armhf !armv7" @@ -120,4 +120,4 @@ vim() { } sha512sums="c3b4b6e66889e30ed5c73b3adf55bec9c547f4f3a81a5511b981d8e6d4b1e370bc71263b3249b625769cea1d13de5aa62f3c039ac5315013c13bc02009e70967 icinga2-2.10.3.tar.gz -f368ea15be7054503924696129fe6b413f9a5cb5344af89f9a0f84df98ac7ef8ab135de60845deced55a982b6b037ce1a00b437189c78fcab981d1e3babec2d5 icinga2.initd" +46890756104563b1a4bc60b5952a2d63f5263883cfe702de7ccc4616dfe5b20d380ff1bc190482741a06bcfe7e662ad14a6965e26b9ce916ef56a1248d6b524c icinga2.initd" diff --git a/community/icinga2/icinga2.initd b/community/icinga2/icinga2.initd index 8fb13162e3..0c53e39579 100644 --- a/community/icinga2/icinga2.initd +++ b/community/icinga2/icinga2.initd @@ -1,18 +1,25 @@ #!/sbin/openrc-run -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 extra_started_commands="reload" -DAEMON="/usr/sbin/icinga2" -ICINGA2_ERROR_LOG="/var/log/icinga2/error.log" -ICINGA2_STARTUP_LOG="/var/log/icinga2/startup.log" -ICINGA2_LOG="/var/log/icinga2/icinga2.log" -ICINGA2_CONFIG_FILE="/etc/icinga2/icinga2.conf" -ICINGA2_RUN_DIR="/run/icinga2" -ICINGA2_STATE_DIR="/var/cache/icinga2" -ICINGA2_CMD_DIR="${ICINGA2_RUN_DIR}/cmd" -ICINGA2_PID_FILE="${ICINGA2_RUN_DIR}/icinga2.pid" +# Set defaults, see /etc/conf.d/icinga2 to override +: ${DAEMON:=/usr/sbin/icinga2} +: ${ICINGA2_CONFIG_FILE:=/etc/icinga2/icinga2.conf} +: ${ICINGA2_RUN_DIR:=/run/icinga2} +: ${ICINGA2_STATE_DIR:=/var/cache/icinga2} +: ${ICINGA2_PID_FILE:=${ICINGA2_RUN_DIR}/icinga2.pid} +: ${ICINGA2_CMD_DIR:=${ICINGA2_RUN_DIR}/cmd} +: ${ICINGA2_LOG_DIR:=/var/log/icinga2} +: ${ICINGA2_ERROR_LOG:=/var/log/icinga2/error.log} +: ${ICINGA2_STARTUP_LOG:=/var/log/icinga2/startup.log} +: ${ICINGA2_LOG:=/var/log/icinga2/icinga2.log} +: ${ICINGA2_CACHE_DIR:=/var/cache/icinga2} +: ${ICINGA2_USER:=icinga} +: ${ICINGA2_GROUP:=icingacmd} +: ${ICINGA2_COMMAND_GROUP:=icingacmd} + ICINGA2_DAEMON_ARGS="daemon -c $ICINGA2_CONFIG_FILE -e $ICINGA2_ERROR_LOG -d" depend() { @@ -25,20 +32,10 @@ checkconfig() { eend 1 fi - 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_GROUP $ICINGA2_STATE_DIR checkpath -d -m 2750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_CMD_DIR + checkpath -d -m 0750 -o $ICINGA2_USER:$ICINGA2_GROUP $ICINGA2_CACHE_DIR if ! $DAEMON daemon -c $ICINGA2_CONFIG_FILE -C > $ICINGA2_STARTUP_LOG 2>&1; then eerror "Icinga2 detected configuration errors. Check '$ICINGA2_STARTUP_LOG' for details." @@ -82,3 +79,4 @@ reload() { fi eend $retval } + -- cgit v1.2.3