diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 14:11:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 14:11:04 +0000 |
commit | a31a6484b79cf48b4b464a6ab84df3361801076e (patch) | |
tree | a7c33f7023721122d1f49ab1dffdc2cd6a8481a5 /debian/freeradius-config.postrm | |
parent | Adding upstream version 3.2.3+dfsg. (diff) | |
download | freeradius-a31a6484b79cf48b4b464a6ab84df3361801076e.tar.xz freeradius-a31a6484b79cf48b4b464a6ab84df3361801076e.zip |
Adding debian version 3.2.3+dfsg-2.debian/3.2.3+dfsg-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/freeradius-config.postrm | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/debian/freeradius-config.postrm b/debian/freeradius-config.postrm new file mode 100644 index 0000000..963579d --- /dev/null +++ b/debian/freeradius-config.postrm @@ -0,0 +1,46 @@ +#!/bin/sh +# vim:ts=2:sw=2:et + +set -e + +case "$1" in + purge) + # Remove dangling links from sites-enabled. + for link in /etc/freeradius/sites-enabled/* \ + /etc/freeradius/3.0/sites-enabled/*; do + if [ -L "$link" ] && [ ! -e "$link" ]; then + rm -f "$link" + fi + done + + # Remove dangling links from mods-enabled. + for link in /etc/freeradius/mods-enabled/* \ + /etc/freeradius/3.0/mods-enabled/*; do + if [ -L "$link" ] && [ ! -e "$link" ]; then + rm -f "$link" + fi + done + + for file in /etc/freeradius/3.0/certs/server.pem \ + /etc/freeradius/3.0/certs/server.key \ + /etc/freeradius/3.0/certs/ca.pem \ + /etc/freeradius/3.0/certs/random \ + /etc/freeradius/3.0/certs/dh \ + /etc/freeradius/certs/server.pem \ + /etc/freeradius/certs/server.key \ + /etc/freeradius/certs/ca.pem \ + /etc/freeradius/certs/random \ + /etc/freeradius/certs/dh; do + rm -f "$file" + done + + # rmdir fails when called on a directory which does not exist + if [ -d /etc/freeradius ]; then + rmdir --ignore-fail-on-non-empty /etc/freeradius + fi + ;; +esac + +#DEBHELPER# + +exit 0 |