config is in minissdpd 1.5.20180223-1.
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | #!/bin/sh
set -e
DEFAULT_FILE="/etc/default/minissdpd"
action=$1
version=$2
. /usr/share/debconf/confmodule
read_config () {
sed -rn '
s/^\s*'"${2}"'='\''([^'\'']+)'\''\s*$/\1/g
t hold
s/^\s*'"${2}"'='\"'([^'\"']+)'\"'\s*$/\1/g
t hold
s/^\s*'"${2}"'=(\S+)\s*$/\1/
t hold
b
: hold
p
' "${1}"
}
if [ -r "${DEFAULT_FILE}" ] ; then
. "${DEFAULT_FILE}"
fi
if [ -z "${MiniSSDPd_INTERFACE_ADDRESS}" ] ; then
# If no interface is defined, try to find one automatically
MiniSSDPd_INTERFACE_ADDRESS=$(LC_ALL=C ip addr | sed -rn '/inet (:10|172\.(:1[6-9]|2[0-9]|3[0-1])|192\.168)\./ { s/.* // p; q }')
fi
if [ -n "${MiniSSDPd_INTERFACE_ADDRESS}" ] ; then
# Use in debconf whatever is set in the default file, if set
db_set minissdpd/listen ${MiniSSDPd_INTERFACE_ADDRESS}
else
# If none found, then we shouldn't start the daemon.
START_DAEMON=0
fi
if [ -z "${START_DAEMON}" ] ; then
START_DAEMON=0
fi
if [ "${START_DAEMON}" = 0 ] ; then
db_set minissdpd/start_daemon false
else
START_DAEMON=1
db_set minissdpd/start_daemon true
fi
if echo "${MiniSSDPd_OTHER_OPTIONS}" | grep -qn '\-6' ; then
db_set minissdpd/ip6 true
else
db_set minissdpd/ip6 false
fi
db_input high minissdpd/start_daemon || true
db_input high minissdpd/listen || true
db_input low minissdpd/ip6 || true
db_go
exit 0
|