This file is indexed.

config is in frontaccounting 2.2.10-3.

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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#!/bin/bash

set -e

if [ -f /usr/share/debconf/confmodule ]; then
  . /usr/share/debconf/confmodule
fi

if [ "$DPKG_DEBUG" = "developer" ]; then
	set -x
fi

db_version 2.0
db_capb backup

step=1
finished="false"

while ! $finished; do
	skip="false"
	case $step in
		1)
			db_input high "frontaccounting/webserver" || true
			next=2
			previous="-1"
		;;
		2)
			db_get "frontaccounting/db_initialized" || true
			previous=1
			dbinitialized="$RET"
			if [ "$dbinitialized" = "true" ]; then
				next=12
			else
				next=3
			fi
			;;
		3)
			if which mysql >/dev/null 2>&1 ; then
				db_input high "frontaccounting/skipdb" || true
			else
				# No mysql client available.
				# skip database setup and tell user to do it.
				db_set "frontaccounting/skipdb" true || true
				db_input high "frontaccounting/manualdb" || true
			fi
			next=4
			previous=1
			;;
		4)
			db_get "frontaccounting/skipdb" || true
			skipdb="$RET"
			previous=3
			if [ "$skipdb" = "true" ]; then
				next=12
			else
				next=5
			fi
		;;
		5)
			db_input critical "frontaccounting/db_host" || true
			previous=3
			next=6
		;;
		6)
			db_beginblock
				db_input critical "frontaccounting/db_admin_user" || true
				db_input critical "frontaccounting/db_admin_pass" || true
			db_endblock
			next=7
			previous=5
		;;
		7)
			db_beginblock
				db_input critical "frontaccounting/db_name" || true
				db_input critical "frontaccounting/db_prefix" || true
				db_input critical "frontaccounting/company" || true
				db_input critical "frontaccounting/db_demo" || true
			db_endblock
      next=8
      previous=6
		;;
		8)
			db_input critical "frontaccounting/db_user" || true
			next=9
			previous=7
		;;
		9)
			db_beginblock
				db_input critical "frontaccounting/db_pass" || true
				db_input critical "frontaccounting/db_pass_conf" || true
			db_endblock
			next=10
			previous=8
		;;
		10)
			# Verify passwords match
			db_get "frontaccounting/db_pass"
			password="$RET"
			db_get "frontaccounting/db_pass_conf"
			confirm="$RET"

			if [ "$password" != "$confirm" ] ; then
				db_reset "frontaccounting/db_pass" || true
				db_fset  "frontaccounting/db_pass" "seen" "false" || true
				db_reset "frontaccounting/db_pass_conf" || true
				db_fset  "frontaccounting/db_pass_conf" "seen" "false" || true
				db_input critical "frontaccounting/pass_mismatch" || true
				next=9
				previous=9
			else
				skip="true"
				next=11
			fi
		;;
		11)
			db_beginblock
				db_input critical "frontaccounting/db_fadmin_pass" || true
				db_input critical "frontaccounting/db_fadmin_conf" || true
			db_endblock
			next=12
			previous=9
		;;
		12)
			# Verify passwords match
			db_get "frontaccounting/db_fadmin_pass"
			password="$RET"
			db_get "frontaccounting/db_fadmin_conf"
			confirm="$RET"

			if [ "$password" != "$confirm" ] ; then
				db_reset "frontaccounting/db_fadmin_pass" || true
				db_fset  "frontaccounting/db_fadmin_pass" "seen" "false" || true
				db_reset "frontaccounting/db_fadmin_conf" || true
				db_fset  "frontaccounting/db_fadmin_conf" "seen" "false" || true
				db_input critical "frontaccounting/fapass_mismatch" || true
				next=11
				previous=11
			else
				skip="true"
				next=13
			fi
		;;
		13)
			db_input medium "frontaccounting/postrm" || true
			next=14
			previous=12
		;;
		14)
			db_get "frontaccounting/webserver" || true
			db_subst "frontaccounting/restart-webserver" webserver $RET
			db_input high "frontaccounting/restart-webserver" || true
			db_go
			next=-1
			if [ "$skipdb" = "true" ]; then
				previous=4
			elif [ "$dbinitialized" = "true" ]; then
				previous=1
			else
				previous=9
			fi
		;;
		-1)
			finished="true"
		;;
		*)
			skip="true"
			message="Unknown step #$step"
			if [ $step -le 0 ]; then
				finished="true"
			fi
	esac

	if ! $skip; then
		#db_title "FrontAccounting" || true
		if db_go; then
			step=$next
		else
			step=$previous
		fi
	else
		step=$next
	fi
done

db_stop
exit 0