From be7fad8cbf898c9b12419fb6570ccec07e38bab3 Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Tue, 7 May 2024 09:53:35 -0400 Subject: [PATCH] build: try to remove frontend and leave only bbb-html5 --- bigbluebutton-config/bin/bbb-conf | 2 - bigbluebutton-html5/deploy_to_usr_share.sh | 41 +++---------------- bigbluebutton-html5/package-lock.json | 2 +- .../bbb-html5/bbb-html5.service | 2 +- 4 files changed, 8 insertions(+), 39 deletions(-) diff --git a/bigbluebutton-config/bin/bbb-conf b/bigbluebutton-config/bin/bbb-conf index 4a0bd9c6ec4c..08fba3230c03 100755 --- a/bigbluebutton-config/bin/bbb-conf +++ b/bigbluebutton-config/bin/bbb-conf @@ -380,8 +380,6 @@ display_bigbluebutton_status () { if [ -f /usr/lib/systemd/system/bbb-html5.service ]; then units="$units mongod bbb-html5" - - units="$units bbb-html5-frontend" fi if [ -f /usr/lib/systemd/system/bbb-graphql-actions.service ]; then diff --git a/bigbluebutton-html5/deploy_to_usr_share.sh b/bigbluebutton-html5/deploy_to_usr_share.sh index 28ff26b49a9f..4679ae391f3b 100755 --- a/bigbluebutton-html5/deploy_to_usr_share.sh +++ b/bigbluebutton-html5/deploy_to_usr_share.sh @@ -16,7 +16,7 @@ fi sudo rm -rf "$UPPER_DESTINATION_DIR" sudo mkdir -p "$UPPER_DESTINATION_DIR" -sudo chown -R meteor:meteor "$UPPER_DESTINATION_DIR" +sudo chown -R root:root "$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 @@ -28,10 +28,9 @@ meteor npm ci --production sudo chmod 777 /usr/share/meteor METEOR_DISABLE_OPTIMISTIC_CACHING=1 meteor build $UPPER_DESTINATION_DIR --architecture os.linux.x86_64 --allow-superuser --directory -sudo chown -R meteor:meteor "$UPPER_DESTINATION_DIR"/ +sudo chown -R root:root "$UPPER_DESTINATION_DIR"/ echo 'stage3' - cd "$DESTINATION_DIR"/programs/server/ || exit sudo chmod -R 777 . meteor npm i @@ -44,43 +43,15 @@ sudo cp $LOCAL_PACKAGING_DIR/mongod_start_pre.sh "$DESTINATION_DIR"/mongod_start echo "writing $DESTINATION_DIR/mongo-ramdisk.conf" sudo cp $LOCAL_PACKAGING_DIR/mongo-ramdisk.conf "$DESTINATION_DIR"/mongo-ramdisk.conf -echo "writing $DESTINATION_DIR/systemd_start_frontend.sh" -sudo cp $LOCAL_PACKAGING_DIR/systemd_start_frontend.sh "$DESTINATION_DIR"/systemd_start_frontend.sh - -sudo chown -R meteor:meteor "$UPPER_DESTINATION_DIR"/ +sudo chown -R root:root "$UPPER_DESTINATION_DIR"/ sudo chmod +x "$DESTINATION_DIR"/mongod_start_pre.sh -sudo chmod +x "$DESTINATION_DIR"/systemd_start_frontend.sh sudo cp $LOCAL_PACKAGING_DIR/workers-start.sh "$DESTINATION_DIR"/workers-start.sh sudo chmod +x "$DESTINATION_DIR"/workers-start.sh - - -echo "writing $SERVICE_FILES_DIR/bbb-html5-frontend.service" -sudo cp $LOCAL_PACKAGING_DIR/bbb-html5-frontend.service "$SERVICE_FILES_DIR"/bbb-html5-frontend.service +echo "writing $SERVICE_FILES_DIR/bbb-html5.service" +sudo cp $LOCAL_PACKAGING_DIR/bbb-html5.service "$SERVICE_FILES_DIR"/bbb-html5.service sudo systemctl daemon-reload -echo 'before stopping bbb-html5:' -ps -ef | grep node- -sudo ss -netlp | grep -i node -echo 'before stopping bbb-html5:' -echo '_____________' - -sudo systemctl stop bbb-html5 - -sleep 5s -echo 'after stopping bbb-html5:' -ps -ef | grep node- -sudo ss -netlp | grep -i node -echo 'after stopping bbb-html5:' -echo '_____________' - -echo 'starting bbb-html5' -sudo systemctl start bbb-html5 -sleep 10s -echo 'after:...' -ps -ef | grep node- -sudo ss -netlp | grep -i node -echo 'after:' -echo '_____________' +sudo systemctl restart bbb-html5 diff --git a/bigbluebutton-html5/package-lock.json b/bigbluebutton-html5/package-lock.json index 2804ef1152b9..48c5954c8af0 100644 --- a/bigbluebutton-html5/package-lock.json +++ b/bigbluebutton-html5/package-lock.json @@ -9430,4 +9430,4 @@ } } } -} +} \ No newline at end of file diff --git a/build/packages-template/bbb-html5/bbb-html5.service b/build/packages-template/bbb-html5/bbb-html5.service index 2202d921c557..4efeaf94a04c 100644 --- a/build/packages-template/bbb-html5/bbb-html5.service +++ b/build/packages-template/bbb-html5/bbb-html5.service @@ -5,7 +5,7 @@ After=redis-server.service mongod.service disable-transparent-huge-pages.service PartOf=bigbluebutton.target [Service] -Type=oneshot +Type=idle ExecStart=/usr/share/meteor/bundle/workers-start.sh # WorkingDirectory=/usr/share/meteor WorkingDirectory=/usr/share/meteor/bundle