File: php4.postinst

package info (click to toggle)
php4 4.0.3pl1-0potato3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 15,168 kB
  • ctags: 20,556
  • sloc: ansic: 155,237; php: 10,827; sh: 9,608; yacc: 1,874; lex: 1,742; makefile: 788; java: 424; awk: 359; cpp: 335; perl: 181; xml: 57
file content (60 lines) | stat: -rw-r--r-- 1,969 bytes parent folder | download
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
#!/bin/sh

set -e

#DEBHELPER#


if [ "$1" != "configure" ]; then
    exit 0
fi


if [ -f /etc/apache/httpd.conf ]; then 
    if ! grep -q "^LoadModule.*php4.so" /etc/apache/httpd.conf; then
	echo "I see you have apache webserver installed and so far you haven't";
	echo "used the apache module version of php4 in your apache. If you";
	echo "want to use it, you should reconfigure the apache webserver and";
	echo "select to load the php module. I can call the apacheconfig script";
	echo "now for you to do it, or you can insert the following line into"; 
	echo "/etc/apache/httpd.conf manually:";
	echo 
	echo "LoadModule php4_module /usr/lib/apache/1.3/libphp4.so";
	echo
	echo -n "Do you want me to run the apacheconfig script now [y/N] ? ";
	read a;
	if echo $a | grep -qi ^y; then
		[ -x /usr/sbin/apacheconfig ] && /usr/sbin/apacheconfig
	else
		echo "Ok, not running apacheconfig. Please read the docs in /usr/share/doc/php4"
#		echo -n "Press RETURN to continue"
#		read a;
	fi
    fi
fi

if [ -f /etc/apache-ssl/httpd.conf ]; then 
    if ! grep -q "^LoadModule.*php4.so" /etc/apache-ssl/httpd.conf; then
	echo "I see you have apache-ssl webserver installed and so far you haven't";
	echo e"used the apache module version of php4 in your apache-ssl. If you";
	echo "want to use it, you should reconfigure the apache-ssl webserver and";
	echo "select to load the php module. I can call the apache-sslconfig script";
	echo "now for you to do it, or you can insert the following line into"; 
	echo "/etc/apache-ssl/httpd.conf manually:";
	echo 
	echo "LoadModule php4_module /usr/lib/apache/1.3/libphp4.so";
	echo
	echo -n "Do you want me to run the apache-sslconfig script now [y/N] ? ";
	read a;
	if echo $a | grep -qi ^y; then
		[ -x /usr/sbin/apache-sslconfig ] && /usr/sbin/apache-sslconfig
	else
		echo "Ok, not running apache-sslconfig. Please read the docs in /usr/share/doc/php4"
#		echo -n "Press RETURN to continue"
#		read a;
	fi
    fi
fi


exit 0