bigbluebutton-Github/bigbluebutton-web/deploy_to_usr_share.sh
2022-03-31 14:53:25 -03:00

29 lines
993 B
Bash
Executable File

#!/usr/bin/env bash
cd "$(dirname "$0")"
sudo service bbb-web stop
./build.sh
grails assemble
mkdir exploded && cd exploded
jar -xvf ../build/libs/bigbluebutton-0.10.0.war
cp ../run-prod.sh .
if [ ! -d /usr/share/bbb-web-old ] ; then
sudo cp -R /usr/share/bbb-web /usr/share/bbb-web-old
echo "A backup was saved in /usr/share/bbb-web-old"
else
echo "A backup in /usr/share/bbb-web-old already exists. Skipping.."
fi
sudo rm -rf /usr/share/bbb-web/assets/ /usr/share/bbb-web/META-INF/ /usr/share/bbb-web/org/ /usr/share/bbb-web/run-prod.sh /usr/share/bbb-web/WEB-INF/
sudo cp -R . /usr/share/bbb-web/
sudo chown bigbluebutton:bigbluebutton /usr/share/bbb-web
sudo chown -R bigbluebutton:bigbluebutton /usr/share/bbb-web/assets/ /usr/share/bbb-web/META-INF/ /usr/share/bbb-web/org/ /usr/share/bbb-web/run-prod.sh /usr/share/bbb-web/WEB-INF/
echo ''
echo ''
echo '----------------'
echo 'bbb-web updated'
cd ..
sudo rm -r exploded
sudo service bbb-web start
echo 'starting service bbb-web'