add forwarded URL to kfreebsd.patch
[debian/iodine.git] / debian / config
1 #!/bin/sh
2
3 CONFIGFILE=/etc/default/iodine
4 set -e
5 . /usr/share/debconf/confmodule
6
7 getvalue() {
8         awk '/^'"$1"'=/ {sub("^'"$1"'=\"", ""); sub("\"$", ""); value=$0;} END {print value}' /etc/default/iodine
9 }
10
11 if [ -s $CONFIGFILE ] ; then
12         START_IODINED="$(getvalue START_IODINED)"
13         db_set iodine/start_daemon    "$START_IODINED"
14         IODINED_ARGS="$(getvalue IODINED_ARGS)"
15         db_set iodine/daemon_options  "$IODINED_ARGS"
16         IODINED_PASSWORD="$(getvalue IODINED_PASSWORD)"
17         db_set iodine/daemon_password "$IODINED_PASSWORD"
18 fi
19
20 db_input medium iodine/start_daemon || true
21 db_go || true
22
23 db_get iodine/start_daemon
24 START_DAEMON=$RET
25
26 if [ "x$START_DAEMON" = "xtrue" ] ; then
27         db_input medium iodine/daemon_options || true
28         db_input medium iodine/daemon_password || true
29         db_go || true
30 fi