config is in nsca 2.9.1-3.1ubuntu1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 31 32 33 34 35 36 37 38 | #!/bin/sh -e
if [ ! "$1" = "configure" ] && [ ! "$1" = "reconfigure" ]; then exit 0; fi
. /usr/share/debconf/confmodule
# if nsca's init script is already configured, we must reflect
# that as the source of configuration, not debconf itself.
# this function figures that out.
run_nsca(){
set +e
invoke-rc.d --query nsca start 2>/dev/null
invoke_said=$?
set -e
case $invoke_said in
# 101 == disabled
101)
echo "false"
;;
# 104 == enabled
104)
echo "true"
;;
# anything else is "undefined", so we then use our defaults
*)
if which nagios >/dev/null 2>&2 || which nagios2 >/dev/null; then
echo "true"
else
echo "false"
fi
;;
esac
}
db_set nsca/run-nsca-daemon `run_nsca`
db_input medium nsca/run-nsca-daemon || true
db_go || true
|