Use icinga2-enable-feature's multi-argument functionality in the Debian/RPM packages.

Refs #6315
This commit is contained in:
Gunnar Beutner 2014-05-27 07:27:12 +02:00
parent 5b3b10b265
commit 59a0ff00a7
4 changed files with 6 additions and 17 deletions

View File

@ -37,10 +37,7 @@ is_fresh_install()
enable_features_for_classic() {
if is_fresh_install $@; then
echo "enabling icinga2 features for classicui"
for feature in compatlog statusdata command; do
icinga2-enable-feature $feature
done
icinga2-enable-feature compatlog statusdata command
echo "reloading icinga2"
[ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload

View File

@ -29,9 +29,7 @@ enable_default_features() {
if is_fresh_install $@ \
|| dpkg --compare-versions "$2" lt "$FIX_VERSION"; then
echo "enabling default icinga2 features"
for feature in checker notification mainlog; do
icinga2-enable-feature $feature
done
icinga2-enable-feature checker notification mainlog
fi
# handle new default features here in the future
}

View File

@ -282,9 +282,7 @@ exit 0
if [ ${1:-0} -eq 1 ]
then
# initial installation, enable default features
%{_sbindir}/icinga2-enable-feature checker
%{_sbindir}/icinga2-enable-feature notification
%{_sbindir}/icinga2-enable-feature mainlog
%{_sbindir}/icinga2-enable-feature checker notification mainlog
fi
exit 0
@ -311,9 +309,7 @@ exit 0
if [ ${1:-0} -eq 1 ]
then
# initial installation, enable default features
%{_sbindir}/icinga2-enable-feature checker
%{_sbindir}/icinga2-enable-feature notification
%{_sbindir}/icinga2-enable-feature mainlog
%{_sbindir}/icinga2-enable-feature checker notification mainlog
fi
exit 0
@ -376,9 +372,7 @@ exit 0
if [ ${1:-0} -eq 1 ]
then
# initial installation, enable features
%{_sbindir}/icinga2-enable-feature statusdata
%{_sbindir}/icinga2-enable-feature compatlog
%{_sbindir}/icinga2-enable-feature command
%{_sbindir}/icinga2-enable-feature statusdata compatlog command
fi
exit 0

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh
ICINGA2CONFDIR=@CMAKE_INSTALL_FULL_SYSCONFDIR@/icinga2
TOOL=$(basename -- $0)