File: config

package info (click to toggle)
b2evolution 0.9.2-3%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 12,972 kB
  • ctags: 5,460
  • sloc: php: 58,989; sh: 298; makefile: 36
file content (81 lines) | stat: -rw-r--r-- 1,932 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
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
#!/bin/sh -e

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

case "$1" in
	configure)
		db_input medium b2evolution/db_ask || true
		db_go || true

		db_get b2evolution/db_ask || true
		DB_AUTO="$RET"
		
		if [ "$DB_AUTO" = "false" ]; then
			db_input high b2evolution/db_manual || true
			db_go || true
		fi

		if [ "$DB_AUTO" = "true" ]; then
			db_input medium b2evolution/db_name || true
			db_go || true
			
		fi
			db_input medium b2evolution/host || true
			db_go || true
			db_get b2evolution/host || true
			URL="$RET"
			BASE_URL=`echo $URL | sed 's/[\/]*$//'`
			RELATIVE_PATH=`echo $BASE_URL | sed 's/http:\/\/[^\/]*//'`
			if [ -z "$RELATIVE_PATH" ]; then
				RELATIVE_PATH="the root of the webserver"
			fi

		db_input medium b2evolution/apache || true
		db_go || true

		if [ "$DB_AUTO" = "true" ]; then
		db_subst b2evolution/install_semi_manual base_url "$BASE_URL" || true
		db_input medium b2evolution/install_semi_manual || true
		fi
		if [ "$DB_AUTO" = "false" ]; then
		db_subst b2evolution/install_manual base_url "$BASE_URL" || true
		db_input medium b2evolution/install_manual || true
		fi
		db_go || true
	;;

	reconfigure)
		db_input medium b2evolution/host || true
        	db_go || true
		db_get b2evolution/host || true
		URL="$RET"
		BASE_URL=`echo $URL | sed 's/[\/]*$//'`
		RELATIVE_PATH=`echo $BASE_URL | sed 's/http:\/\/[^\/]*//'`
		if [ -z "$RELATIVE_PATH" ]; then
			RELATIVE_PATH="the root of the webserver"
		fi

		db_input medium b2evolution/apache || true
		db_go || true

		db_subst b2evolution/install_auto base_url "$BASE_URL" || true
		db_input medium b2evolution/install_auto || true
		db_go || true
	;;

	 abort-upgrade|abort-remove|abort-deconfigure)
	 ;;
	       
	 *)
		echo "postinst called with unknown argument \`$1'" >&2
		exit 1
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
 
#DEBHELPER#

exit 0