[Pkg-citadel-commit] r216 - webcit/trunk/debian
meskes at alioth.debian.org
meskes at alioth.debian.org
Tue Feb 24 14:16:32 UTC 2009
Author: meskes
Date: 2009-02-24 14:16:31 +0000 (Tue, 24 Feb 2009)
New Revision: 216
Modified:
webcit/trunk/debian/changelog
webcit/trunk/debian/citadel-webcit.config
webcit/trunk/debian/citadel-webcit.postinst
webcit/trunk/debian/citadel-webcit.templates
webcit/trunk/debian/webcit.init
Log:
reworked debconf setup
Modified: webcit/trunk/debian/changelog
===================================================================
--- webcit/trunk/debian/changelog 2009-02-24 11:42:20 UTC (rev 215)
+++ webcit/trunk/debian/changelog 2009-02-24 14:16:31 UTC (rev 216)
@@ -3,6 +3,7 @@
* New upstream version.
* Changed watch file to account for an additional letter in the version
number if present.
+ * Reworked debconf setup.
-- Michael Meskes <meskes at debian.org> Fri, 20 Feb 2009 16:47:56 +0100
Modified: webcit/trunk/debian/citadel-webcit.config
===================================================================
--- webcit/trunk/debian/citadel-webcit.config 2009-02-24 11:42:20 UTC (rev 215)
+++ webcit/trunk/debian/citadel-webcit.config 2009-02-24 14:16:31 UTC (rev 216)
@@ -21,42 +21,48 @@
fi
if test "$DO_CONFIGURE" = "yes"; then
- if test -e /etc/default/webcit; then
- . /etc/default/webcit
- else
- export WEBCIT_CITADEL_IP=127.0.0.1
- export WEBCIT_CITADEL_PORT=504
- fi
- STATE=1
- LASTSTATE=3
- while [ "$STATE" != 0 -a "$STATE" -le "$LASTSTATE" ]; do
+ if test -e /etc/default/webcit; then
+ . /etc/default/webcit
+ else
+ WEBCIT_APACHEFLAG=" "
+ WEBCIT_HTTP_PORT=8504
+ WEBCIT_HTTPS_PORT=-1
+ WEBCIT_LANG=UNLIMITED
+ fi
+
+ if test "$WEBCIT_APACHEFLAG" = "-f"; then
+ db_set citadel/WebcitApacheIntegration Apache2
+ else
+ db_set citadel/WebcitApacheIntegration Internal
+ fi
+ db_set citadel/WebcitHttpPort $WEBCIT_HTTP_PORT
+ db_set citadel/WebcitHttpsPort $WEBCIT_HTTPS_PORT
+ db_set citadel/WebcitOfferLang $WEBCIT_LANG
+ STATE=1
+ LASTSTATE=4
+ while [ "$STATE" != 0 -a "$STATE" -le "$LASTSTATE" ]; do
+
case "$STATE" in
1)
db_input high citadel/WebcitApacheIntegration || true
- db_go
;;
2)
db_get citadel/WebcitApacheIntegration
if test "$RET" = "Internal"; then
+ db_set citadel/WebcitHttpPort 80
db_input high citadel/WebcitHttpPort || true
- else
- db_set citadel/WebcitHttpPort 8504 || true
fi
;;
- 3)
- db_get citadel/WebcitApacheIntegration || true
+ 3)
+ db_get citadel/WebcitApacheIntegration
if test "$RET" = "Internal"; then
+ db_set citadel/WebcitHttpsPort 443
db_input high citadel/WebcitHttpsPort || true
- export WEBCIT_LISTEN_IP=0.0.0.0
- else
- db_set citadel/WebcitHttpsPort -1
- export WEBCIT_LISTEN_IP=127.0.0.1
fi
;;
4)
db_input high citadel/WebcitOfferLang || true
- db_go
;;
esac
if db_go; then
@@ -64,24 +70,8 @@
else
STATE=$(($STATE - 1))
fi
-
- done
- db_go
- db_get citadel/WebcitHttpPort && WEBCIT_HTTP_PORT="$RET"
- db_get citadel/WebcitHttpsPort && WEBCIT_HTTPS_PORT="$RET"
- db_get citadel/WebcitBindIp && WEBCIT_LISTEN_IP="$RET"
- db_get citadel/WebcitOfferLang && WEBCIT_LANG="$RET"
-
- db_get ciatdel/WebcitWebserver &&WWWTYPE="$RET"
- if test "$WWWTYPE" = "Internal"; then
- WEBCIT_APACHEFLAG=" "
- else
- WEBCIT_APACHEFLAG="-f"
- fi
- set |grep WEBCIT |sed "s;^;export ;;" >/etc/default/webcit
+ done
fi
-
-
exit 0
Modified: webcit/trunk/debian/citadel-webcit.postinst
===================================================================
--- webcit/trunk/debian/citadel-webcit.postinst 2009-02-24 11:42:20 UTC (rev 215)
+++ webcit/trunk/debian/citadel-webcit.postinst 2009-02-24 14:16:31 UTC (rev 216)
@@ -14,7 +14,29 @@
mkdir -p /var/run/citadel/keys
fi
- db_get citadel/WebcitApacheIntegration &&WWWTYPE="$RET"
+ if test -e /etc/default/webcit; then
+ . /etc/default/webcit
+ else
+ WEBCIT_CITADEL_IP=127.0.0.1
+ WEBCIT_CITADEL_PORT=504
+ fi
+
+ 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#
Modified: webcit/trunk/debian/citadel-webcit.templates
===================================================================
--- webcit/trunk/debian/citadel-webcit.templates 2009-02-24 11:42:20 UTC (rev 215)
+++ webcit/trunk/debian/citadel-webcit.templates 2009-02-24 14:16:31 UTC (rev 216)
@@ -26,7 +26,6 @@
Type: select
_Choices: UNLIMITED, da_DA, de_DE, en_GB, es_ES, fr_FR, it_IT, nl_NL, pt_BR
Default: UNLIMITED
-_Description: Limit Webcits Login language selection
- Select language for the Webcit should run in; select UNLIMITED
- to leave this choice to your user at the login prompt.
- hint: localeconf has to enable the locale so webcit can use it
+_Description: Limit Webcits login language selection
+ Select language the Webcit server should run in. UNLIMITED
+ leaves this choice to the user at the login prompt.
Modified: webcit/trunk/debian/webcit.init
===================================================================
--- webcit/trunk/debian/webcit.init 2009-02-24 11:42:20 UTC (rev 215)
+++ webcit/trunk/debian/webcit.init 2009-02-24 14:16:31 UTC (rev 216)
@@ -112,7 +112,8 @@
do_reload() {
do_stop
- do_start
+ do_start $WEBCIT_HTTP_PORT $WEBCIT_CITADEL_IP $WEBCIT_CITADEL_PORT "" "$LISTEN" "$WEBCIT_APACHEFLAG"
+ do_start $WEBCIT_HTTPS_PORT $WEBCIT_CITADEL_IP $WEBCIT_CITADEL_PORT -s "$LISTEN" "$WEBCIT_APACHEFLAG"
return 0
}
More information about the Pkg-citadel-commit
mailing list