aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2019-02-27 15:22:11 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2019-02-27 15:22:16 +0000
commit13a795722752324b9fd74df3570bde80ecb59d86 (patch)
tree2f4e31d5bba5079561ae69e3537fb1afcd0277cd
parentee23bb2d68d2f65e687350b554c72097aace94d3 (diff)
downloadaports-13a795722752324b9fd74df3570bde80ecb59d86.tar.bz2
aports-13a795722752324b9fd74df3570bde80ecb59d86.tar.xz
community/icinga2: updated initd
-rw-r--r--community/icinga2/APKBUILD4
-rw-r--r--community/icinga2/icinga2.initd40
2 files changed, 21 insertions, 23 deletions
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 <fcolista@alpinelinux.org>
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
}
+