Debian Codegraph @

debian/icinga2-bin.postinst

raw
1 #!/bin/sh
2 # postinst script for icinga2-bn
3
4 set -e
5
6 is_fresh_install()
7 {
8 if [ -z "$2" ] ; then
9 return 0
10 fi
11 return 1
12 }
13
14 enable_default_features() {
15 FIX_VERSION="0.0.5+icingasnap201312070000"
16 if is_fresh_install $@ \
17 || dpkg --compare-versions "$2" lt "$FIX_VERSION"; then
18 echo "enabling default icinga2 features"
19 icinga2 feature enable checker notification mainlog
20 fi
21 # handle new default features here in the future
22 }
23
24 case "$1" in
25 configure)
26 # enable default features
27 enable_default_features $@
28 ;;
29
30 abort-upgrade|abort-remove|abort-deconfigure)
31 ;;
32
33 *)
34 echo "postinst called with unknown argument \`$1'" >&2
35 exit 1
36 ;;
37 esac
38
39 #DEBHELPER#
40
41 exit 0