mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
* Creates conf.d in /etc/prosody if missing. Fixes a problem installing prosody 0.10 when using prosody repositories. * Cleanups certificates on purge. There are various occasions where users purge packages and the new installations after that generate certificate which doesn't end up in the java trust store on the target machine. * Generate jicofo user and component passwords if missing. There are situations where if prosody is already installed, the order of configuring the packages is not in the correct order. In those situations jitsi-meet-prosody got configured before jicofo and the user password and the component secret are not available and we ask the user for that and later when jicofo is configured we generate new set of them. Now we will end up always generating them in jitsi-meet-prosody or jicofo and we will reuse them. See https://github.com/jitsi/jicofo/pull/283.
69 lines
1.8 KiB
Bash
69 lines
1.8 KiB
Bash
#!/bin/sh
|
|
# postrm script for jitsi-meet-prosody
|
|
#
|
|
# 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
|
|
remove)
|
|
if [ -x "/etc/init.d/prosody" ]; then
|
|
invoke-rc.d prosody reload
|
|
fi
|
|
;;
|
|
|
|
purge)
|
|
db_get jitsi-meet-prosody/jvb-hostname
|
|
JVB_HOSTNAME=$RET
|
|
if [ -n "$RET" ]; then
|
|
rm -f /etc/prosody/conf.avail/$JVB_HOSTNAME.cfg.lua
|
|
rm -f /etc/prosody/conf.d/$JVB_HOSTNAME.cfg.lua
|
|
|
|
# clean up generated certificates
|
|
rm -f /etc/prosody/certs/$JVB_HOSTNAME.crt
|
|
rm -f /etc/prosody/certs/$JVB_HOSTNAME.key
|
|
rm -f /etc/prosody/certs/auth.$JVB_HOSTNAME.crt
|
|
rm -f /etc/prosody/certs/auth.$JVB_HOSTNAME.key
|
|
rm -rf /var/lib/prosody/auth.$JVB_HOSTNAME.*
|
|
rm -rf /var/lib/prosody/$JVB_HOSTNAME.*
|
|
fi
|
|
|
|
# Clear the debconf variable
|
|
db_purge
|
|
;;
|
|
|
|
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
|