aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/icinga2
diff options
context:
space:
mode:
authorLars Engels <lme@FreeBSD.org>2016-04-24 16:58:58 +0000
committerLars Engels <lme@FreeBSD.org>2016-04-24 16:58:58 +0000
commita8c6c74a3052cb8b6da78eaf0969ee155be6e803 (patch)
tree1cdc76f21c6ce515a48cff0bc98071c17bc49b8b /net-mgmt/icinga2
parent130a86c55517beba771a188e27749d0c8152904d (diff)
downloadports-a8c6c74a3052cb8b6da78eaf0969ee155be6e803.tar.gz
ports-a8c6c74a3052cb8b6da78eaf0969ee155be6e803.zip
- Update to 2.4.7
- Introduce new rc.conf variable "icinga2_mkvar" defaulting to "NO". The variable controls the creation and chown'ing of missing files and directories in /var. [1] - Add an UPDATING entry for this PR: 206022 [1] Submitted by: Oliver Hartmann <ohartman@zedat.fu-berlin.de> Sponsored by: Essen Linuxhotel Hackathon 2016
Notes
Notes: svn path=/head/; revision=413950
Diffstat (limited to 'net-mgmt/icinga2')
-rw-r--r--net-mgmt/icinga2/Makefile2
-rw-r--r--net-mgmt/icinga2/distinfo4
-rw-r--r--net-mgmt/icinga2/files/icinga2.in46
3 files changed, 29 insertions, 23 deletions
diff --git a/net-mgmt/icinga2/Makefile b/net-mgmt/icinga2/Makefile
index 6b5f042017e7..0deb4e53f798 100644
--- a/net-mgmt/icinga2/Makefile
+++ b/net-mgmt/icinga2/Makefile
@@ -2,7 +2,7 @@
PORTNAME= icinga2
DISTVERSIONPREFIX= v
-DISTVERSION= 2.4.4
+DISTVERSION= 2.4.7
CATEGORIES= net-mgmt
MAINTAINER= lme@FreeBSD.org
diff --git a/net-mgmt/icinga2/distinfo b/net-mgmt/icinga2/distinfo
index a0ef8cb4429e..37b6360a597f 100644
--- a/net-mgmt/icinga2/distinfo
+++ b/net-mgmt/icinga2/distinfo
@@ -1,2 +1,2 @@
-SHA256 (icinga-icinga2-v2.4.4_GH0.tar.gz) = ce19ed52c447929f5f9dae11b75d080b76b7aa680ee930c59db4202a2218d6b5
-SIZE (icinga-icinga2-v2.4.4_GH0.tar.gz) = 1361983
+SHA256 (icinga-icinga2-v2.4.7_GH0.tar.gz) = db00c3bf1be5b18a477953f39df467039521d4f00826951d5c6de43cef96acd9
+SIZE (icinga-icinga2-v2.4.7_GH0.tar.gz) = 1763118
diff --git a/net-mgmt/icinga2/files/icinga2.in b/net-mgmt/icinga2/files/icinga2.in
index 0ab4434bc9bd..542f9abf112b 100644
--- a/net-mgmt/icinga2/files/icinga2.in
+++ b/net-mgmt/icinga2/files/icinga2.in
@@ -12,6 +12,9 @@
# Set it to "YES" to enable icinga2.
# icinga2_flags (str): Set to "" by default.
# icinga2_configfile (str): Set to "%%PREFIX%%/etc/icinga2/icinga2.cfg" by default.
+# icinga2_mkvar (bool): Set to "NO" by default.
+# Set it to "YES" to have the rc script create all
+# directories in /var (needed when /var is on a ramdisk)
#
. /etc/rc.subr
@@ -27,6 +30,7 @@ load_rc_config "${name}"
: ${icinga2_enable:="NO"}
: ${icinga2_configfile="%%PREFIX%%/etc/${name}/${name}.conf"}
+: ${icinga2_mkvar:="NO"}
command="%%PREFIX%%/sbin/${name}"
procname="/usr/local/lib/icinga2/sbin/icinga2"
@@ -79,26 +83,28 @@ reload_precmd() {
}
start_precmd() {
- # Create necessary directories / change ownership
- #
- # While this is also done through pkg-plist, /var might be on a ramdisk,
- # so make sure all needed files and directories are created before starting
- # Icinga.
- for d in "${icinga2_logdir}" "${icinga2_logdir}/compat" \
- "${icinga2_logdir}/compat/archives" "${icinga2_libdir}" \
- "${icinga2_spooldir}" "${icinga2_spooldir}/tmp" \
- "${icinga2_rundir}" "${icinga2_cachedir}"; do
- if [ ! -d "${d}" ]; then
- install -d -o ${icinga2_user} -g ${icinga2_group} "${d}"
- else
- chown ${icinga2_user}:${icinga2_group} "${d}"
- fi
- done
-
- install -d -o ${icinga2_user} -g %%WWWGRP%% "${icinga2_rundir}/cmd"
-
- chown -R ${icinga2_user}:${icinga2_user} "${icinga2_libdir}"
- chown -R ${icinga2_user}:${icinga2_user} "${icinga2_spooldir}"
+ if checkyesno "icinga2_mkvar"; then
+ # Create necessary directories / change ownership
+ #
+ # While this is also done through pkg-plist, /var might be on a ramdisk,
+ # so make sure all needed files and directories are created before starting
+ # Icinga.
+ for d in "${icinga2_logdir}" "${icinga2_logdir}/compat" \
+ "${icinga2_logdir}/compat/archives" "${icinga2_libdir}" \
+ "${icinga2_spooldir}" "${icinga2_spooldir}/tmp" \
+ "${icinga2_rundir}" "${icinga2_cachedir}"; do
+ if [ ! -d "${d}" ]; then
+ install -d -o ${icinga2_user} -g ${icinga2_group} "${d}"
+ else
+ chown ${icinga2_user}:${icinga2_group} "${d}"
+ fi
+ done
+
+ install -d -o ${icinga2_user} -g %%WWWGRP%% "${icinga2_rundir}/cmd"
+
+ chown -R ${icinga2_user}:${icinga2_user} "${icinga2_libdir}"
+ chown -R ${icinga2_user}:${icinga2_user} "${icinga2_spooldir}"
+ fi
if ! icinga2_checkconfig; then
return 1