This file is indexed.

config is in sympa 6.1.7~dfsg-2.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
#!/bin/sh

set -e

# Debconf configuration script for Sympa.
# by Jerome Marant <jerome@debian.org>

# Modifications by Stefan Hornburg (Racke) <racke@linuxia.de>.

# Source debconf library
. /usr/share/debconf/confmodule

db_version 2.0

conf="/etc/sympa/sympa.conf"
wwconf="/etc/sympa/wwsympa.conf"

# Language selection
# - currently supported languages
possible_langs="ca cs de el es et_EE fr hu it ja_JP ko nl oc pt_BR ru sv tr zh_CN zh_TW"
supported_langs="en_US"
locales=$(locale -a)

for lang in $possible_langs ; do
	if locale -a | grep -q "$lang" ; then
		supported_langs="$supported_langs, $lang"
	fi
done

# Get the language value in case of a manual change
if [ -f "$conf" ]; then
	lang=$(perl -nle 'if (/^\s*lang\s+(\w+)/) {print $1;}' "$conf")
	db_set sympa/language "$lang"
	# Get the hostname.
	# Since this parameter could be a unix command, we have
	# to check this and run the command to get the value
	if grep -q "^[ 	]*host" "$conf" ; then
		host=$(perl -nle 'if (/^\s*host\s+(.*)$/) {
					if ($1 =~ m/^`(.*)`$/) {
						$cmd=`$1`; print $cmd;
					} else {
						print $1;
					}
				}' "$conf")
	else
		host=$(perl -nle 'if (/^\s*domain\s+(.*)$/) {
					if ($1 =~ m/^`(.*)`$/) {
						$cmd=`$1`; print $cmd;
					} else {
						print $1;
					}
				}' "$conf")
	fi
	# Get the listmasters, since this parameter could be a unix command, we have
	# to check this and run the command to get the value
	listmaster=$(perl -nle 'if (/^\s*listmaster\s+(.*)$/) {
					if ($1 =~ m/^`(.*)`$/) {
						$cmd=`$1`; print $cmd;
					} else {
						print $1;
					}
				}' "$conf")
else
	# Get default values on configure
    host=$(head -n 1 /etc/mailname || hostname -f || echo localhost)
	listmaster=
fi

# Set default values

# Ask for language
if [ "$supported_langs" != "en_US" ]; then
	db_subst sympa/language supported_langs $supported_langs
	db_input medium sympa/language || [ $? -eq 30 ]
	db_go
else
	db_set sympa/language en_US
fi

db_get sympa/hostname
if [ -z "$RET" ]; then
	db_set sympa/hostname "$host"
fi
db_input medium sympa/hostname || [ $? -eq 30 ]
db_go

db_get sympa/listmaster
if [ -z "$RET" ]; then
	db_get sympa/hostname
	if [ "$listmaster" ]; then
		db_set sympa/listmaster "$listmaster"
	else
		db_set sympa/listmaster "listmaster@$RET"
	fi
fi
db_input medium sympa/listmaster || [ $? -eq 30 ]
db_go

if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
	dbc_dbtypes="mysql, pgsql, sqlite3, sqlite"
	dbc_authmethod_user="password"
	. /usr/share/dbconfig-common/dpkg/config
	dbc_first_version="5.3.4-6~"
	if [ -f "$conf" ] && dbctmpfile=$(tempfile -p sympa); then
		# Extract sympa.conf options parsable by dbconfig-common
		perl -ne 'print "$1=\"$2\"\n" if /^\s*(db_[a-z]+)\s*(.*)\s*$/' \
			"$conf" > "$dbctmpfile"
		dbc_load_include="sh:$dbctmpfile"
		dbc_load_include_args="-d db_name -p db_passwd -s db_host -P db_port -u db_user -t db_type"
	fi
	dbc_go sympa $@
	rm -f -- "$dbctmpfile"
fi

db_get wwsympa/wwsympa_url
if [ -z "$RET" ]; then
	wwsympa_url_default="http://${host}/wws"

	# Get the url from sympa.conf
	if [ -f "$conf" ]; then
		wwsympa_url_conf=$(perl -nle 'if (/^\s*wwsympa_url\s+(.*)$/) {print $1;}' "$conf")
		if [ -z "$wwsympa_url" ]; then
			db_get wwsympa/wwsympa_url
			wwsympa_url_conf="$RET"
		fi
	fi
	if [ -z "$wwsympa_url_conf" ]; then
		db_set wwsympa/wwsympa_url "$wwsympa_url_default"
	else
		db_set wwsympa/wwsympa_url "$wwsympa_url_conf"
	fi
fi

db_input medium wwsympa/wwsympa_url || [ $? -eq 30 ]
db_go

db_get wwsympa/fastcgi
if [ -z "$RET" ] && [ -f "$wwconf" ]; then
	fastcgi=$(perl -nle 'if (/^\s*use_fast_cgi\s+(\d)$/) {print $1;}' "$wwconf")
	case "$fastcgi" in
		1)
			fastcgi="true"
			;;
		*)
			fastcgi="false"
		;;
	esac
	db_set wwsympa/fastcgi "$fastcgi"
fi

# Ask for the installed web server
db_input high wwsympa/webserver_type || [ $? -eq 30 ]
db_go

db_get wwsympa/webserver_type
webserver="$RET"

if [ "$webserver" != "none" ]; then
	# Ask for fastCGI configuration
	db_input medium wwsympa/fastcgi || [ $? -eq 30 ]
	db_go
	# Ask for soap usage
	db_input medium sympa/use_soap || [ $? -eq 30 ]
	db_go
	db_input high wwsympa/webserver_restart || [ $? -eq 30 ]
	db_go
fi

# Ask for spool directories removal
db_input medium wwsympa/remove_spool || [ $? -eq 30 ]
db_go