#!/bin/sh -e # Please check bigbluebutton/bigbluebutton-html5/dev_local_deployment/README.md echo " start " pwd UPPER_DESTINATION_DIR=/usr/share/meteor DESTINATION_DIR=$UPPER_DESTINATION_DIR/bundle SERVICE_FILES_DIR=/usr/lib/systemd/system LOCAL_PACKAGING_DIR=/home/bigbluebutton/dev/bigbluebutton/bigbluebutton-html5/dev_local_deployment sudo rm -rf "$UPPER_DESTINATION_DIR" sudo mkdir -p "$UPPER_DESTINATION_DIR" sudo chown -R meteor:meteor "$UPPER_DESTINATION_DIR" # the next 5 lines may be temporarily commented out if you are sure you are not tweaking the required node_modules after first use of the script. This will save a minute or two during the run of the script if [ -d "node_modules" ]; then rm -r node_modules/ fi meteor reset meteor npm install --production sudo chmod 777 /usr/share/meteor METEOR_DISABLE_OPTIMISTIC_CACHING=1 meteor build $UPPER_DESTINATION_DIR --architecture os.linux.x86_64 --allow-superuser sudo chown -R meteor:meteor "$UPPER_DESTINATION_DIR"/ echo 'stage3' tar -xzf $UPPER_DESTINATION_DIR/bigbluebutton-html5.tar.gz -C $UPPER_DESTINATION_DIR cd "$DESTINATION_DIR"/programs/server/ || exit npm i --production echo "deployed to $DESTINATION_DIR/programs/server\n\n\n" echo "writing $DESTINATION_DIR/mongod_start_pre.sh" sudo cp $LOCAL_PACKAGING_DIR/mongod_start_pre.sh "$DESTINATION_DIR"/mongod_start_pre.sh echo "writing $DESTINATION_DIR/mongo-ramdisk.conf" sudo cp $LOCAL_PACKAGING_DIR/mongo-ramdisk.conf "$DESTINATION_DIR"/mongo-ramdisk.conf echo "writing $DESTINATION_DIR/bbb-html5-with-roles.conf" sudo tee "$DESTINATION_DIR/bbb-html5-with-roles.conf" >/dev/null <