summaryrefslogtreecommitdiff
path: root/pcr/icinga2/icinga2.install
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-01-22 06:41:42 +0100
committerAndreas Grapentin <andreas@grapentin.org>2018-01-22 06:41:42 +0100
commit11af0bdb5827abac120ed0900ff6c485ed51b1af (patch)
treee226f78e274e79b96389a2cb115451fbf470febd /pcr/icinga2/icinga2.install
parente3d2043bcaaff828b1cd7e4707110d2e2bd213ed (diff)
downloadabslibre-11af0bdb5827abac120ed0900ff6c485ed51b1af.tar.gz
abslibre-11af0bdb5827abac120ed0900ff6c485ed51b1af.tar.bz2
abslibre-11af0bdb5827abac120ed0900ff6c485ed51b1af.zip
pcr/icinga2: updated to 2.8.1
Diffstat (limited to 'pcr/icinga2/icinga2.install')
-rw-r--r--pcr/icinga2/icinga2.install30
1 files changed, 10 insertions, 20 deletions
diff --git a/pcr/icinga2/icinga2.install b/pcr/icinga2/icinga2.install
index 86ea3d4bc..14ec50e3d 100644
--- a/pcr/icinga2/icinga2.install
+++ b/pcr/icinga2/icinga2.install
@@ -19,26 +19,6 @@ post_install() {
/usr/bin/icinga2 feature enable notification &> /dev/null
}
-pre_upgrade() {
- /usr/bin/chown -R root:root \
- /etc/icinga2 \
- /var/lib/icinga2 \
- /var/spool/icinga2 \
- /var/cache/icinga2 \
- /var/log/icinga2
-}
-
-post_upgrade() {
- /usr/bin/chown -R icinga:icinga \
- /etc/icinga2 \
- /var/lib/icinga2 \
- /var/spool/icinga2
-
- /usr/bin/chown -R icinga:icingacmd \
- /var/cache/icinga2 \
- /var/log/icinga2
-}
-
pre_remove() {
[ -f "/etc/icinga2/features-enabled/checker.conf" ] && /usr/bin/icinga2 feature disable checker &> /dev/null
[ -f "/etc/icinga2/features-enabled/mainlog.conf" ] && /usr/bin/icinga2 feature disable mainlog &> /dev/null
@@ -50,3 +30,13 @@ post_remove() {
/usr/bin/getent group icinga &> /dev/null && /usr/bin/groupdel icinga &> /dev/null
/usr/bin/getent group icingacmd &> /dev/null && /usr/bin/groupdel icingacmd &> /dev/null
}
+
+post_upgrade() {
+ if [[ "$(vercmp "$2" '2.8.0')" -lt 0 ]]; then
+ cat << EOF
+==> Icinga version 2.8.0 requires an DB IDO schema upgrade and uses new paths
+==> for certificates. Check the upgrading instructions for details:
+==> https://www.icinga.com/docs/icinga2/latest/doc/16-upgrading-icinga-2/#upgrading-to-v28
+EOF
+ fi
+}