* Attempting to add a smart host in webcit was instead adding it as an RBL host....
[citadel.git] / webcit / debian / citadel-webcit.config
blobb266d2cb6d44527b18876633a4736d4eab56696d
1 #!/bin/sh
2 set -e
3 . /usr/share/debconf/confmodule
5 db_version 2.0
7 db_capb backup
9 DO_CONFIGURE=no
11 if test -n "$2"; then
12 # do we want to reconfigure?
13 if test "`echo $2 | sed -e 's/[.-]//g'`" -lt 127 \
14 -o "$1" = reconfigure
15 then
16 DO_CONFIGURE=yes
18 else
19 # are we in first install?
20 if test "$1" = "configure"; then
21 DO_CONFIGURE=yes
25 if test "$DO_CONFIGURE" = "yes"; then
26 if test -e /etc/default/webcit; then
27 . /etc/default/webcit
28 else
29 export WEBCIT_CITADEL_IP=127.0.0.1
30 export WEBCIT_CITADEL_PORT=504
32 STATE=1
33 LASTSTATE=5
34 while [ "$STATE" != 0 -a "$STATE" -le "$LASTSTATE" ]; do
36 case "$STATE" in
38 db_input high citadel/WebcitApacheIntegration || true
39 db_go
42 db_get citadel/WebcitApacheIntegration
43 if test "$RET" = "Internal"; then
44 db_input high citadel/WebcitHttpPort || true
45 else
46 db_set citadel/WebcitHttpPort 8504 || true
49 3)
50 db_get citadel/WebcitApacheIntegration || true
51 if test "$RET" = "Internal"; then
52 db_input high citadel/WebcitHttpsPort || true
53 export WEBCIT_LISTEN_IP=0.0.0.0
54 else
55 db_set citadel/WebcitHttpsPort -1
56 export WEBCIT_LISTEN_IP=127.0.0.1
60 db_input high citadel/WebcitOfferLang || true
61 db_go
64 db_input high citadel/WebcitInstallnote||true
66 esac
67 if db_go; then
68 STATE=$(($STATE + 1))
69 else
70 STATE=$(($STATE - 1))
73 done
74 db_go
75 db_get citadel/WebcitHttpPort && WEBCIT_HTTP_PORT="$RET"
76 db_get citadel/WebcitHttpsPort && WEBCIT_HTTPS_PORT="$RET"
77 db_get citadel/WebcitBindIp && WEBCIT_LISTEN_IP="$RET"
78 db_get citadel/WebcitOfferLang && WEBCIT_LANG="$RET"
80 db_get ciatdel/WebcitWebserver &&WWWTYPE="$RET"
81 if test "$WWWTYPE" = "Internal"; then
82 WEBCIT_APACHEFLAG=" "
83 else
84 WEBCIT_APACHEFLAG="-f"
87 set |grep WEBCIT |sed "s;^;export ;;" >/etc/default/webcit
92 exit 0