File: config

package info (click to toggle)
myphpmoney 1.3RC3-13
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,160 kB
  • ctags: 884
  • sloc: php: 18,081; pascal: 2,106; sh: 327; xml: 239; makefile: 137; sql: 130
file content (41 lines) | stat: -rw-r--r-- 1,218 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
# myphpmoney package configuration script

# Source debconf library -- we have a Depends line
# to make sure it is there...
. /usr/share/debconf/confmodule
db_version 2.0
db_title MyPhpMoney

if [ "$1" = configure -o "$1" = reconfigure ] ; then
	db_input "critical" "myphpmoney/configuration" || true
	db_go
	db_get "myphpmoney/configuration"
	if [ "$RET" = "true" ]; then

		webservers=""	
		for i in apache apache-ssl apache-perl apache2 ; do
			if [ -x /usr/sbin/$i ] ; then
				webservers="$webservers $i"
			fi
		done		
		webservers="$(echo $webservers | sed -e 's/ /, /g' -e 's/, *$$//')"

		if ! [ -z "$webservers" ] ; then
			db_subst "myphpmoney/webservers" webservers "$webservers"
			db_input "high" "myphpmoney/webservers" || true
		else
			db_set "myphpmoney/webservers" ""
		fi
		db_input "high" "myphpmoney/databasemgr_server" || true
		db_input "critical" "myphpmoney/mysql_dbadmin" || true
		db_input "critical" "myphpmoney/dbadmpass" || true
		db_input "medium" "myphpmoney/mysql_user" || true
		db_input "medium" "myphpmoney/database_pass" || true
		db_input "medium" "myphpmoney/database_name" || true
		db_input "high" "myphpmoney/postrm_remove_database" || true
		db_go
	fi	
fi

exit 0