prerm 722 Bytes
Newer Older
1 2 3 4 5 6
#!/bin/sh
set -e

. /usr/share/debconf/confmodule

case "$1" in
7
    # Delete completely /opt/slapos/eggs directory as Python egg directory names
8
    # include their versions (failed-upgrade is just there for old-prerm)
9
    # XXX-Cedric: there are smarter ways to do that
10
    upgrade|failed-upgrade)
11
        rm -rf /opt/slapos/eggs
12 13 14
        rm -rf /opt/slapos/develop-eggs
        rm -rf /opt/slapos/parts
    ;;
15
esac
16
if [ -f /etc/openvpn/vifib.conf ]; then
17 18 19
    cp -f /etc/openvpn/vifib.conf /etc/openvpn/vifib.backup.conf
    cp -rf /etc/openvpn/vifib-keys/ /etc/openvpn/vifib-backup-keys
    sed -i "s/\/etc\/openvpn\/vifib-keys/\/etc\/openvpn\/vifib-backup-keys/g"  /etc/openvpn/vifib.backup.conf
20
fi
21 22 23 24

#DEBHELPER#

exit 0