summaryrefslogtreecommitdiffstats
path: root/debian/prerm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/prerm36
1 files changed, 36 insertions, 0 deletions
diff --git a/debian/prerm b/debian/prerm
new file mode 100644
index 0000000..b2b1564
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+set -eu
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ # Rspamd web interface doesn't support symlinks and directory traversal
+ # remove copied javascript files
+ rm -f /usr/share/rspamd/www/js/lib/bootstrap.bundle.min.js
+ rm -f /usr/share/rspamd/www/css/bootstrap.min.css
+ rm -f /usr/share/rspamd/www/js/lib/jquery.min.js
+ rm -f /usr/share/rspamd/www/js/lib/require.min.js
+
+ # path of previous versions
+ rm -f /usr/share/rspamd/www/js/lib/bootstrap.min.js
+ rm -f /usr/share/rspamd/www/js/lib/jquery-3.3.1.min.js
+
+ # remove copied font files
+ rm -f /usr/share/rspamd/www/fonts/glyphicons-halflings-regular.ttf
+ rm -f /usr/share/rspamd/www/fonts/glyphicons-halflings-regular.woff
+ rm -f /usr/share/rspamd/www/fonts/glyphicons-halflings-regular.woff2
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#