2 # Abort if any command returns an error value
4 . /usr/share/debconf/confmodule
10 if test ! -d /var/lib/citadel/keys; then
11 mkdir -p /var/lib/citadel/keys
13 if test ! -d /var/run/citadel/keys; then
14 mkdir -p /var/run/citadel/keys
17 if test -e /etc/default/webcit; then
20 WEBCIT_CITADEL_IP=127.0.0.1
21 WEBCIT_CITADEL_PORT=504
24 db_get citadel/WebcitApacheIntegration && WWWTYPE="$RET"
25 if test "$WWWTYPE" = "Internal"; then
26 echo 'export WEBCIT_APACHEFLAG=" "' > /etc/default/webcit
27 echo "export WEBCIT_LISTEN_IP=${WEBCIT_LISTEN_IP:-0.0.0.0}" >> /etc/default/webcit
29 echo 'export WEBCIT_APACHEFLAG="-f"' > /etc/default/webcit
30 echo "export WEBCIT_LISTEN_IP=${WEBCIT_LISTEN_IP:-127.0.0.1}" >> /etc/default/webcit
33 db_get citadel/WebcitHttpPort && echo "export WEBCIT_HTTP_PORT=$RET" >> /etc/default/webcit
34 db_get citadel/WebcitHttpsPort && echo "export WEBCIT_HTTPS_PORT=$RET" >> /etc/default/webcit
35 db_get citadel/WebcitOfferLang && echo "export WEBCIT_LANG=$RET" >> /etc/default/webcit
37 echo "export WEBCIT_CITADEL_PORT=$WEBCIT_CITADEL_PORT" >> /etc/default/webcit
38 echo "export WEBCIT_CITADEL_IP=$WEBCIT_CITADEL_IP" >> /etc/default/webcit
44 # update the webserver, if needed
51 webservers="apache-ssl"
56 a2enmod proxy_http||true
59 webservers="apache apache-ssl apache2"
65 for server in $webservers; do
66 if [ -d "/etc/${server}/conf.d" ]; then
67 if [ ! -e "/etc/${server}/conf.d/webcit.conf" ] ; then
68 ln -sf /etc/citadel/webcit.conf "/etc/${server}/conf.d/webcit.conf"
70 invoke-rc.d $server reload || true
74 abort-upgrade|abort-remove|abort-deconfigure)
76 *) echo "$0: didn't understand being called with '$1'" 1>&2