summaryrefslogtreecommitdiffstats
path: root/debian/wordpress.preinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:56:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:56:53 +0000
commita9c818418b81b93680170e1a84d4e221e578ad2f (patch)
tree5b883aa428f1edb12f5d40f9768438ee16a7ed6b /debian/wordpress.preinst
parentAdding upstream version 6.4.3+dfsg1. (diff)
downloadwordpress-a9c818418b81b93680170e1a84d4e221e578ad2f.tar.xz
wordpress-a9c818418b81b93680170e1a84d4e221e578ad2f.zip
Adding debian version 6.4.3+dfsg1-1.debian/6.4.3+dfsg1-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/wordpress.preinst')
-rw-r--r--debian/wordpress.preinst21
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/wordpress.preinst b/debian/wordpress.preinst
new file mode 100644
index 0000000..db4f729
--- /dev/null
+++ b/debian/wordpress.preinst
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ upgrade)
+ if dpkg --compare-versions "$2" lt 5.8.1+dfsg1-2; then
+ # Move the incorrectly placed AppArmor file
+ if [ -d /etc/apparmor.d/apache2.d/wordpress ]; then
+ mv /etc/apparmor.d/apache2.d/wordpress /etc/apparmor.d/apache2.d/wordpress.old
+ if [ -e /etc/apparmor.d/apache2.d/wordpress.old/wordpress.apparmor ]; then
+ mv /etc/apparmor.d/apache2.d/wordpress.old/wordpress.apparmor /etc/apparmor.d/apache2.d/wordpress.tmp
+ fi
+ # Try to remove the old directory but ignore if it fails
+ rmdir /etc/apparmor.d/apache2.d/wordpress.old || true
+ fi
+ fi
+ ;;
+esac
+
+#DEBHELPER#