summaryrefslogtreecommitdiffstats
path: root/debian/freeradius-config.preinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/freeradius-config.preinst')
-rw-r--r--debian/freeradius-config.preinst27
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/freeradius-config.preinst b/debian/freeradius-config.preinst
new file mode 100644
index 0000000..0c5e8b7
--- /dev/null
+++ b/debian/freeradius-config.preinst
@@ -0,0 +1,27 @@
+#!/bin/sh
+# vim:ts=2:sw=2:et
+
+set -e
+
+case "$1" in
+ upgrade)
+ # Delete any symlinks/files which were created in postinst previously.
+ # These are not covered by conffile handling, so they would otherwise not
+ # be cleaned up.
+ for file in /etc/freeradius/certs/ca.pem \
+ /etc/freeradius/certs/server.key \
+ /etc/freeradius/certs/server.pem \
+ /etc/freeradius/sites-enabled/default \
+ /etc/freeradius/sites-enabled/inner-tunnel
+ do
+ if [ -h "$file" ]
+ then
+ rm -f "$file"
+ fi
+ done
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0