2
# config script for lurker
6
. /usr/share/debconf/confmodule
8
# Use a state machine to allow jumping back to previous questions.
10
while [ "$STATE" != 0 -a "$STATE" != 3 ]; do
13
if test -d /etc/apache/conf.d || test -d /etc/apache-ssl/conf.d \
14
|| test -d /etc/apache-perl/conf.d; then
15
db_input high lurker/apache_config || true
17
db_input high lurker/webserver || true
19
if [ -e /etc/lurker/lurker.conf ]; then
20
if dpkg --compare-versions "$2" ">=" 0.9; then
21
export archve=`lurker-params -c /etc/lurker/lurker.conf -a`
22
export admnme=`lurker-params -c /etc/lurker/lurker.conf -n`
23
export admadr=`lurker-params -c /etc/lurker/lurker.conf -e`
25
export archve=`grep "^[[:space:]]*archive[[:space:]]*=" /etc/lurker/lurker.conf | sed 's/^[^=]*=[[:space:]]*\([[:graph:]]*[[:print:]]\)[[:space:]]*/\1/' | tail -1`
26
export admnme=`grep "^[[:space:]]*admin_name[[:space:]]*=" /etc/lurker/lurker.conf | sed 's/^[^=]*=[[:space:]]*\([[:graph:]]*[[:print:]]\)[[:space:]]*/\1/' | tail -1`
27
export admadr=`grep "^[[:space:]]*admin_address[[:space:]]*=" /etc/lurker/lurker.conf | sed 's/^[^=]*=[[:space:]]*\([[:graph:]]*[[:print:]]\)[[:space:]]*/\1/' | tail -1`
29
if [ "$archve" ]; then
30
db_set lurker/archive $archve
32
if [ "$admnme" ]; then
33
db_set lurker/admin_name $admnme
35
if [ "$admadr" ]; then
36
db_set lurker/admin_address $admadr
40
db_input low lurker/archive || true
41
db_input low lurker/admin_name || true
42
db_input low lurker/admin_address || true
48
if [ "$2" ] && dpkg --compare-versions "$2" "<" 0.6; then
49
db_input high lurker/obsolete_db || true
50
elif [ "$2" ] && dpkg --compare-versions "$2" "<" 1.0; then
51
if [ -e /var/lib/lurker/db ]; then
52
db_input high lurker/upgrade_db || true
60
if db_go || true; then