bigbluebutton-Github/build/packages-template/bbb-webrtc-sfu/before-install.sh
Daniel Schreiber c5f351d238 Update bbb-webrtc-sfu packaging to include mediasoup and ...
... drop build artifacts from compiling mediasoup. This reduces package
size from ~ 54 MB to ~ 12 MB.

Additionally this drops the `npm rebuild` command from the after-install
script. It should not be necessary to recompile stuff during
installation. To ensure a clean `node_modules` directory, it will be
cleaned in the before-install script.
2021-10-08 22:54:57 +02:00

32 lines
772 B
Bash
Executable File

#!/bin/bash -e
case "$1" in
install|upgrade|1|2)
#
# remember setting for sip
#
rm -f /tmp/webrtc-sfu.nginx
if [ -f /etc/bigbluebutton/nginx/webrtc-sfu.nginx ]; then
cp /etc/bigbluebutton/nginx/webrtc-sfu.nginx /tmp/webrtc-sfu.nginx
fi
rm -f /tmp/bbb-webrtc-sfu-default.yml
if [ -f /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml ]; then
cp /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml /tmp/bbb-webrtc-sfu-default.yml
fi
# there might be remaining files from older BBB versions
# BBB 2.3 and earlier did an npm rebuild in the after-install script.
rm -rf /usr/local/bigbluebutton/bbb-webrtc-sfu/node_modules
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac