mkdir -p /var/run/citadel/keys
fi
- db_get citadel/WebcitApacheIntegration &&WWWTYPE="$RET"
- db_stop
-# Hack: make webcit use gnome icons. roll your own if wanted.
- if test ! -L /usr/share/citadel-webcit/static/icons; then
- ln -sf /usr/share/icons/gnome/24x24/mimetypes /usr/share/citadel-webcit/static/icons || true
+ if test -e /etc/default/webcit; then
+ . /etc/default/webcit
+ else
+ WEBCIT_CITADEL_IP=127.0.0.1
+ WEBCIT_CITADEL_PORT=504
fi
- #DEBHELPER#
- if test ! -L /usr/share/citadel-webcit/static/; then
- ln -sf /usr/share/prototypejs/prototype.js /usr/share/citadel-webcit/static/
+
+ db_get citadel/WebcitApacheIntegration && WWWTYPE="$RET"
+ if test "$WWWTYPE" = "Internal"; then
+ echo 'export WEBCIT_APACHEFLAG=" "' > /etc/default/webcit
+ echo "export WEBCIT_LISTEN_IP=${WEBCIT_LISTEN_IP:-0.0.0.0}" >> /etc/default/webcit
+ else
+ echo 'export WEBCIT_APACHEFLAG="-f"' > /etc/default/webcit
+ echo "export WEBCIT_LISTEN_IP=${WEBCIT_LISTEN_IP:-127.0.0.1}" >> /etc/default/webcit
fi
+
+ db_get citadel/WebcitHttpPort && echo "export WEBCIT_HTTP_PORT=$RET" >> /etc/default/webcit
+ db_get citadel/WebcitHttpsPort && echo "export WEBCIT_HTTPS_PORT=$RET" >> /etc/default/webcit
+ db_get citadel/WebcitOfferLang && echo "export WEBCIT_LANG=$RET" >> /etc/default/webcit
+
+ echo "export WEBCIT_CITADEL_PORT=$WEBCIT_CITADEL_PORT" >> /etc/default/webcit
+ echo "export WEBCIT_CITADEL_IP=$WEBCIT_CITADEL_IP" >> /etc/default/webcit
+
+ db_stop
+
+ #DEBHELPER#
+
# update the webserver, if needed
case "$WWWTYPE" in
"Apache")
webservers="apache"
- /usr/sbin/aenmod proxy||true
+ aenmod proxy||true
;;
"Apache-SSL")
webservers="apache-ssl"
;;
"Apache2")
webservers="apache2"
- /usr/sbin/a2enmod proxy||true
- /usr/sbin/a2enmod proxy_http||true
+ a2enmod proxy||true
+ a2enmod proxy_http||true
;;
"All")
webservers="apache apache-ssl apache2"
esac
for server in $webservers; do
if [ -d "/etc/${server}/conf.d" ]; then
- if [ ! -e "/etc/${server}/conf.d/webcit-citadel" ] ; then
+ if [ ! -e "/etc/${server}/conf.d/webcit.conf" ] ; then
ln -sf /etc/citadel/webcit.conf "/etc/${server}/conf.d/webcit.conf"
fi
invoke-rc.d $server reload || true