Bump Standards-Version to 3.9.3 (no changes).
[debian/iodine.git] / debian / config
1 #!/bin/sh
2
3 set -e
4
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 /etc/default/iodine ] ; then
12         START_IODINED="$(getvalue START_IODINED)"
13         if [ -n "$START_IODINED" ] ; then
14                 db_set iodine/start_daemon "$START_IODINED"
15         fi
16         IODINED_ARGS="$(getvalue IODINED_ARGS)"
17         if [ -n "$IODINED_ARGS" ] ; then
18                 db_set iodine/daemon_options "$IODINED_ARGS"
19         fi
20         IODINED_PASSWORD="$(getvalue IODINED_PASSWORD)"
21         if [ -n "$IODINED_PASSWORD" ] ; then
22                 db_set iodine/daemon_password "$IODINED_PASSWORD"
23         fi
24 fi
25
26 db_input medium iodine/start_daemon || true
27 db_go
28
29 db_get iodine/start_daemon
30 START_DAEMON=$RET
31
32 if [ "x$START_DAEMON" = "xtrue" ] ; then
33         db_input medium iodine/daemon_options || true
34         db_input medium iodine/daemon_password || true
35         db_go
36 fi