File: postinst

package info (click to toggle)
libapache-csacek 2.1.9-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,500 kB
  • ctags: 1,773
  • sloc: ansic: 11,833; makefile: 454; yacc: 199; sh: 164; php: 51; sed: 5
file content (59 lines) | stat: -rw-r--r-- 2,036 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
# modified version of php3 postinst

set -e

#DEBHELPER#

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


if [ -f /etc/apache/httpd.conf ]; then 
    if ! grep -q "^LoadModule.*mod_csacek.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 icsacek 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 csacek_module /usr/lib/apache/1.3/mod_csacek.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/libapache-csacek"
		echo -n "Press RETURN to continue"
		read a;
	fi
   fi
fi

if [ -f /etc/apache-ssl/httpd.conf ]; then 
    if ! grep -q "^LoadModule.*mod_csacek.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 csacek 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 csacek_module /usr/lib/apache/1.3/mod_csacek.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/php3"
		echo -n "Press RETURN to continue"
		read a;
	fi
   fi
fi

exit 0