~ubuntu-branches/ubuntu/lucid/apache2/lucid

12 by Andreas Barth
* Non-maintainer upload.
1
#!/bin/sh -e
2
3
if [ "$1" != "configure" ]; then
4
        exit 0
5
fi
6
14 by Peter Samuelson
* High-urgency upload for RC bugfixes.
7
mod_is_enabled() {
8
    test -L /etc/apache2/mods-enabled/$1.load
9
}
10
12 by Andreas Barth
* Non-maintainer upload.
11
#set up default site and dummy error and access logs
14.3.2 by Stefan Fritsch
* New upstream release:
12
if [ -z "$2" ]; then
12 by Andreas Barth
* Non-maintainer upload.
13
        if [ ! -L /etc/apache2/sites-enabled/000-default -a \
14
             ! -f /etc/apache2/sites-enabled/000-default ]; then
37 by Kees Cook
* Merge from debian unstable, remaining changes:
15
                a2ensite -q default
12 by Andreas Barth
* Non-maintainer upload.
16
        fi
17
        touch /var/log/apache2/error.log /var/log/apache2/access.log
18
        chown root:adm /var/log/apache2/error.log /var/log/apache2/access.log
19
        chmod 0640 /var/log/apache2/error.log /var/log/apache2/access.log
20
fi
21
14 by Peter Samuelson
* High-urgency upload for RC bugfixes.
22
# Note, this line catches new installs as well as upgrades
23
if dpkg --compare-versions "$2" lt 2.2.3-3.1; then
37 by Kees Cook
* Merge from debian unstable, remaining changes:
24
	a2enmod -q alias
25
	a2enmod -q autoindex
26
	a2enmod -q dir
27
	a2enmod -q env
28
	a2enmod -q mime
29
	a2enmod -q negotiation
30
	a2enmod -q setenvif
31
	a2enmod -q status
32
	a2enmod -q auth_basic
33
	a2enmod -q deflate
12 by Andreas Barth
* Non-maintainer upload.
34
35
        # Those come from mod_auth:
37 by Kees Cook
* Merge from debian unstable, remaining changes:
36
	a2enmod -q authz_default
37
	a2enmod -q authz_user
38
	a2enmod -q authz_groupfile
39
	a2enmod -q authn_file
12 by Andreas Barth
* Non-maintainer upload.
40
        
41
	# This comes from mod_access:
37 by Kees Cook
* Merge from debian unstable, remaining changes:
42
	a2enmod -q authz_host
12 by Andreas Barth
* Non-maintainer upload.
43
14 by Peter Samuelson
* High-urgency upload for RC bugfixes.
44
fi
12 by Andreas Barth
* Non-maintainer upload.
45
17 by Stefan Fritsch
* Modularize config: Move module specific configuration from apache2.conf
46
if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.2.4-2; then
47
	echo -n activating new config files ...
48
	for a in actions alias autoindex info mime negotiation setenvif status ; do 
49
		if mod_is_enabled $a && [ ! -e /etc/apache2/mods-enabled/$a.conf ] ; then
50
			ln -sf 	../mods-available/$a.conf /etc/apache2/mods-enabled/$a.conf
51
			echo -n " $a.conf"
52
		fi
53
	done
54
	echo " done."
55
fi
56
26 by Stefan Fritsch
* New upstream version:
57
# Note, this line catches new installs as well as upgrades
58
if dpkg --compare-versions "$2" lt 2.2.7-1~0; then
59
	if [ ! -e /var/www/index.html  -a \
30 by Chuck Short
debian/apache2-2-common.postinst: Fix for index.html if it is a dangling
60
	     ! -h /var/www/index.html  -a \
26 by Stefan Fritsch
* New upstream version:
61
	     ! -e /var/www/index.cgi   -a \
62
	     ! -e /var/www/index.pl    -a \
63
	     ! -e /var/www/index.php   -a \
64
	     ! -e /var/www/index.xhtml -a \
65
	     ! -e /var/www/index.htm ] ; then
66
		cp /usr/share/apache2/default-site/index.html /var/www/index.html
67
	fi
68
fi
69
14.3.7 by Stefan Fritsch
* Backport various mod_dav/mod_dav_fs fixes from upstream trunk svn. This
70
# DavLockDB format change
71
if dpkg --compare-versions "$2" lt 2.2.14-3~; then
72
	rm -f /var/lock/apache2/DAVLock.dir /var/lock/apache2/DAVLock.pag
73
fi
74
60 by Chuck Short
* debian/patches/206-fix-potential-memory-leaks.dpatch: Fix potential memory
75
# Note, this line catches new installs as well as upgrades
76
if dpkg --compare-versions "$2" lt 2.2.15-1~0; then
77
	a2enmod -q reqtimeout
78
fi
79
80
17 by Stefan Fritsch
* Modularize config: Move module specific configuration from apache2.conf
81
rm -f /etc/apache2/ports.conf.dpkg-apache2.2-common.old
82
rm -f /etc/default/apache2.dpkg-apache2.2-common.old
83
rm -f /etc/apache2/conf.d/charset.dpkg-apache2.2-common.old
84
85
[ -f /etc/apache2/httpd.conf ] || touch /etc/apache2/httpd.conf
86
26 by Stefan Fritsch
* New upstream version:
87
#DEBHELPER#
17 by Stefan Fritsch
* Modularize config: Move module specific configuration from apache2.conf
88
12 by Andreas Barth
* Non-maintainer upload.
89
exit 0
17 by Stefan Fritsch
* Modularize config: Move module specific configuration from apache2.conf
90