2014-08-10 19:29:48 +00:00
|
|
|
#!/bin/sh
|
2016-11-21 21:16:37 +00:00
|
|
|
# postrm script for jitsi-meet-web-config
|
2014-08-10 19:29:48 +00:00
|
|
|
#
|
|
|
|
# see: dh_installdeb(1)
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# summary of how this script can be called:
|
|
|
|
# * <postrm> `remove'
|
|
|
|
# * <postrm> `purge'
|
|
|
|
# * <old-postrm> `upgrade' <new-version>
|
|
|
|
# * <new-postrm> `failed-upgrade' <old-version>
|
|
|
|
# * <new-postrm> `abort-install'
|
|
|
|
# * <new-postrm> `abort-install' <old-version>
|
|
|
|
# * <new-postrm> `abort-upgrade' <old-version>
|
|
|
|
# * <disappearer's-postrm> `disappear' <overwriter>
|
|
|
|
# <overwriter-version>
|
|
|
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
|
|
|
# the debian-policy package
|
|
|
|
|
|
|
|
# Load debconf
|
|
|
|
. /usr/share/debconf/confmodule
|
|
|
|
|
|
|
|
|
|
|
|
case "$1" in
|
2014-08-26 13:43:49 +00:00
|
|
|
remove)
|
2022-11-03 06:34:45 +00:00
|
|
|
if [ -x "/etc/init.d/openresty" ]; then
|
|
|
|
invoke-rc.d openresty reload || true
|
|
|
|
fi
|
2014-08-10 19:29:48 +00:00
|
|
|
if [ -x "/etc/init.d/nginx" ]; then
|
2019-12-18 15:46:21 +00:00
|
|
|
invoke-rc.d nginx reload || true
|
2014-08-10 19:29:48 +00:00
|
|
|
fi
|
2016-11-30 05:11:15 +00:00
|
|
|
if [ -x "/etc/init.d/apache2" ]; then
|
2019-12-18 15:46:21 +00:00
|
|
|
invoke-rc.d apache2 reload || true
|
2016-11-30 05:11:15 +00:00
|
|
|
fi
|
2014-08-10 19:29:48 +00:00
|
|
|
;;
|
2014-10-23 08:00:48 +00:00
|
|
|
purge)
|
|
|
|
db_get jitsi-meet/jvb-hostname
|
2021-03-04 11:29:06 +00:00
|
|
|
JVB_HOSTNAME=$(echo "$RET" | xargs echo -n)
|
2014-10-23 08:00:48 +00:00
|
|
|
if [ -n "$RET" ]; then
|
|
|
|
rm -f /etc/jitsi/meet/$JVB_HOSTNAME-config.js
|
|
|
|
rm -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf
|
|
|
|
rm -f /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf
|
2022-11-03 06:34:45 +00:00
|
|
|
rm -f /usr/local/openresty/nginx/conf/$JVB_HOSTNAME.conf
|
2016-11-30 05:11:15 +00:00
|
|
|
rm -f /etc/apache2/sites-available/$JVB_HOSTNAME.conf
|
|
|
|
rm -f /etc/apache2/sites-enabled/$JVB_HOSTNAME.conf
|
2016-11-21 21:16:37 +00:00
|
|
|
rm -f /etc/jitsi/meet/$JVB_HOSTNAME.key
|
|
|
|
rm -f /etc/jitsi/meet/$JVB_HOSTNAME.crt
|
2014-10-23 08:00:48 +00:00
|
|
|
fi
|
2016-11-21 21:16:37 +00:00
|
|
|
# Clear the debconf variable
|
|
|
|
db_purge
|
2014-10-23 08:00:48 +00:00
|
|
|
;;
|
|
|
|
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
2014-08-10 19:29:48 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
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
|