File: apache2.2-common.preinst

package info (click to toggle)
apache2 2.2.22-13%2Bdeb7u6
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 47,900 kB
  • sloc: ansic: 233,662; sh: 15,591; perl: 2,223; awk: 1,172; makefile: 1,081; lex: 191; python: 142; yacc: 100; xml: 36
file content (30 lines) | stat: -rw-r--r-- 1,133 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
#! /bin/sh -e

mv_conffile() {
	if [ "`md5sum $1 2>/dev/null | cut -d ' ' -f 1`" = "$2" ] ; then
		echo Replacing $1 with new version ...
		mv $1 $1.dpkg-apache2.2-common.old
	fi
}

if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.2.4-2; then
	mv_conffile /etc/default/apache2 	9ac83f9132b78c3aa6dd4d7a583bf476
	mv_conffile /etc/default/apache2 	801eb5156368b54d92ecb578ce710836
	mv_conffile /etc/apache2/ports.conf	d5fcefc335117f400d451de47efeca87
	mv_conffile /etc/apache2/conf.d/charset 641239a7d2d172856cb1413a47d2e142
fi

if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.2.15-4~ ; then
	# The definition of other_vhosts_access.log has been moved from
	# apache2.conf to conf.d/other-vhosts-access-log. If the admin has
	# removed it from apache2.conf, mark it to be disabled in
	# conf.d/other-vhosts-access-log in the postinst.
	if ! egrep -q '^ *CustomLog.*other_vhosts_access.log vhost_combined$' /etc/apache2/apache2.conf
	then
		touch /etc/apache2/disable-other-vhost-access-log.dpkg-apache2.2-common
	fi
fi

dpkg-maintscript-helper rm_conffile /etc/apache2/mods-available/version.load 2.2.22-6~ -- "$@"

#DEBHELPER#