54 lines
1.2 KiB
Bash
54 lines
1.2 KiB
Bash
#!/bin/bash
|
|
# postrm script for jitsi-videobridge
|
|
|
|
set -e
|
|
|
|
# Load debconf
|
|
. /usr/share/debconf/confmodule
|
|
|
|
|
|
case "$1" in
|
|
purge)
|
|
|
|
# Clear the debconf variable
|
|
db_purge
|
|
|
|
# and then remove the user
|
|
if getent passwd jvb > /dev/null ; then
|
|
deluser jvb || true
|
|
fi
|
|
|
|
# clear logs
|
|
if [ -d "/var/log/jitsi" ]; then
|
|
rm -rf "/var/log/jitsi"
|
|
fi
|
|
|
|
rm -f /etc/jitsi/videobridge/config
|
|
rm -f /etc/jitsi/videobridge/jvb.conf
|
|
rm -f /etc/jitsi/videobridge/sip-communicator.properties
|
|
rm -f /etc/jitsi/videobridge/logging.properties
|
|
rm -rf /usr/share/jitsi-videobridge/.java
|
|
rm -rf /usr/share/jitsi-videobridge/.sip-communicator
|
|
|
|
# make sure we remove keys we used ('jitsi-videobridge/jvb-hostname')
|
|
db_unregister jitsi-videobridge/jvb-hostname || true
|
|
;;
|
|
|
|
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
|
;;
|
|
|
|
*)
|
|
echo "postrm called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# dh_installdeb will replace this with shell code automatically
|
|
# generated by other debhelper scripts.
|
|
|
|
#DEBHELPER#
|
|
|
|
db_stop
|
|
|
|
exit 0
|