bigbluebutton-Github/build/packages-template/bbb-html5/after-remove.sh
Anton Georgiev 488d78742d build: move bbb-html5 files from /var/bigbluebutton
Closes https://github.com/bigbluebutton/bigbluebutton/issues/21161
As suggested by @danimo the client files for bbb-html5
are not variable/dynamic content and are a better fit for /usr/share
than for /var/bigbluebutton (where they'd also be in the way of
recording files)
2024-09-25 12:39:04 -04:00

38 lines
1.1 KiB
Bash
Executable File

#!/bin/bash -e
log() {
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1"
}
case "$1" in
remove|failed-upgrade|abort-upgrade|abort-install|disappear|0|1)
if [ -L /etc/nginx/sites-enabled/bigbluebutton ]; then
rm /etc/nginx/sites-enabled/bigbluebutton
log "Removed symbolic link /etc/nginx/sites-enabled/bigbluebutton"
fi
if [ -L /usr/share/bigbluebutton/html5-client ]; then
rm /usr/share/bigbluebutton/html5-client
log "Removed symbolic link /usr/share/bigbluebutton/html5-client"
fi
# legacy location of html5-client circa BBB 3.0.0-beta.1
if [ -d /var/bigbluebutton/html5-client ]; then
rm -rf /var/bigbluebutton/html5-client
log "Removed directory /var/bigbluebutton/html5-client"
fi
if [ -d /usr/share/bigbluebutton/html5-client ]; then
rm -rf /usr/share/bigbluebutton/html5-client
log "Removed directory /usr/share/bigbluebutton/html5-client"
fi
;;
upgrade)
log "Upgrade argument received. No action taken."
;;
*)
echo "postinst called with unknown argument $1" >&2
log "Unknown argument: $1"
;;
esac