File: icinga-common.config

package info (click to toggle)
icinga 1.14.2+ds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 49,264 kB
  • sloc: ansic: 108,564; sql: 9,656; sh: 4,945; perl: 3,439; makefile: 1,213; php: 581; xml: 104
file content (30 lines) | stat: -rw-r--r-- 690 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh -e


. /usr/share/debconf/confmodule

conffile="/etc/icinga/icinga.cfg"

if [ -e "$conffile" ]; then
	check_external_commands="$(grep -E '^ *check_external_commands=' $conffile | sed -e 's|.*check_external_commands=||')"

	# translate icinga option into debconf boolean
	# (this is better than using a select in debconf with Choices-C,
	# otherwise all translators would need to translate 'yes' and 'no').

	case $check_external_commands in
		0)
			check_external_commands=false
			;;

		1)
			check_external_commands=true
			;;
	esac

	db_set icinga/check_external_commands $check_external_commands
    db_input high icinga/check_external_commands || true
    db_go || true
fi