[apache2] 01/01: Remove default /var/www/html/index.html on package purge
Stefan Fritsch
sf at moszumanska.debian.org
Mon Aug 17 17:58:15 UTC 2015
This is an automated email from the git hooks/post-receive script.
sf pushed a commit to branch master
in repository apache2.
commit 5d6f60f5ca72dd436627248281e2f4e4e23269a8
Author: Stefan Fritsch <sf at sfritsch.de>
Date: Mon Aug 17 19:54:34 2015 +0200
Remove default /var/www/html/index.html on package purge
---
debian/apache2.postrm | 21 ++++++++++++++++++++-
debian/changelog | 1 +
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/debian/apache2.postrm b/debian/apache2.postrm
index 01c4e6f..d66dc41 100644
--- a/debian/apache2.postrm
+++ b/debian/apache2.postrm
@@ -18,6 +18,23 @@ set -e
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
+is_default_index_html () {
+ local FILE="$1"
+ [ -f "$FILE" ] || return 1
+ local MD5=$(md5sum "$FILE" 2> /dev/null |cut -d' ' -f 1) ||
+ return 1
+ grep -q "$MD5" <<- EOF
+ 1736dfc80cf1f5a8966c096a0b094377
+ 21dde95d9d269cbb2fa6560309dca40c
+ 3183a3d71d86bcc88aaf3ca5cbbefb45
+ 51a41c3207374dad24ec64a0f2646bdc
+ 5388f60d7695cb57b87c799ee62d20b2
+ 74cec59a19e5d16f7cc6a2445e35fa3b
+ 776221a94e5a174dc2396c0f3f6b6a74
+ c481228d439cbb54bdcedbaec5bbb11a
+ EOF
+}
+
case "$1" in
purge)
@@ -49,7 +66,9 @@ case "$1" in
rmdir $d 2> /dev/null || true
done
- #XXX: index.html is intentionally(?) left back
+ if is_default_index_html /var/www/html/index.html ; then
+ rm -f /var/www/html/index.html
+ fi
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
diff --git a/debian/changelog b/debian/changelog
index c1ea973..56df5dc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ apache2 (2.4.16-3) UNRELEASED; urgency=medium
[ Stefan Fritsch ]
* apxs: Don't pass --silent to libtool. Closes: #795820
+ * Remove default /var/www/html/index.html on package purge.
-- Jean-Michel Vourgère <nirgal at debian.org> Tue, 11 Aug 2015 11:12:04 +0200
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apache2.git
More information about the Pkg-apache-commits
mailing list