diff --git a/install.sh b/install.sh index 9aa34fc8..8b93a054 100755 --- a/install.sh +++ b/install.sh @@ -7,8 +7,6 @@ if [[ $EUID -eq 0 ]]; then exit 1 fi - - # Get the BigBlueButton version from the release file version=$(grep -oP 'BIGBLUEBUTTON_RELEASE=\K[\d.]+' /etc/bigbluebutton/bigbluebutton-release) @@ -28,13 +26,13 @@ if [[ $version == "2.6.10" ]]; then # Check if .env file exists if [[ -f .env ]]; then - # Overwrite existing environment variables if they exist - sed -i -E "s~^(BBB_URL=).*~\1${BBB_URL}~" .env - sed -i -E "s~^(BBB_SECRET=).*~\1${BBB_SECRET}~" .env + # Overwrite existing environment variables if they exist + sed -i -E "s~^(BBB_URL=).*~\1${BBB_URL}~" .env + sed -i -E "s~^(BBB_SECRET=).*~\1${BBB_SECRET}~" .env else - # Create new .env file - echo "BBB_URL=${BBB_URL}" >> .env - echo "BBB_SECRET=${BBB_SECRET}" >> .env + # Create new .env file + echo "BBB_URL=${BBB_URL}" >> .env + echo "BBB_SECRET=${BBB_SECRET}" >> .env fi cat .env @@ -47,20 +45,19 @@ if [[ $version == "2.6.10" ]]; then sudo cp -R /usr/share/meteor/bundle /usr/share/meteor/bbb-html5-original || { echo "Error: Failed to copy bundle"; exit 1; } # Set ownership of copied files to the current user - sudo chown -R $current_user:$current_user /usr/share/meteor/bbb-html5-original else echo "bbb-html5-original folder already exists. Skipping copy and ownership changes." fi - # Navigate to src/bigbluebutton-html5 directory + # Navigate to src/bigbluebutton-html5 directory cd src/bigbluebutton-html5 if npm install --legacy-peer-deps; then - echo "Packages installed successfully" + echo "Packages installed successfully" else - echo "Error:Failed install packages" - exit 1 + echo "Error: Failed to install packages" + exit 1 fi # Check if Meteor is installed @@ -71,6 +68,20 @@ if [[ $version == "2.6.10" ]]; then else echo "Meteor is already installed" fi + + if sudo rm "$(pwd)"/private/config/settings.yml; then + echo "settings.yml removed successfully" + else + echo "Error: Failed to remove settings.yml" + exit 1 + fi + + if cp /usr/share/meteor/bundle/programs/server/assets/app/config/settings.yml "$(pwd)"/private/config/; then + echo "Successfully copied settings.yml" + else + echo "Error: Failed to copy settings.yml" + exit 1 + fi # Create build folder if it doesn't exist build_path=$(dirname "$(dirname "$(pwd)")")/build @@ -88,11 +99,13 @@ if [[ $version == "2.6.10" ]]; then cd ../../ + + if sudo tar -xzvf "$(pwd)"/build/*.tar.gz -C /usr/share/meteor; then - echo "files are copied to meteor" + echo "Files are copied to meteor" else - echo "Error: Failed copy files to meteor" - exit 1 + echo "Error: Failed to copy files to meteor" + exit 1 fi @@ -119,14 +132,14 @@ if [[ $version == "2.6.10" ]]; then cd "$(pwd)"/streaming-server # Install packages - if npm install; then + if npm install; then echo "Packages installed successfully" else echo "Error: Failed to install packages" exit 1 fi - # Copy streaming.nginx file to /usr/share/bigbluebutton/nginx + # Copy streaming.nginx file to /usr/share/bigbluebutton/nginx sudo cp streaming.nginx /usr/share/bigbluebutton/nginx || { echo "Error: Failed to copy streaming.nginx"; exit 1; } # Reload Nginx server @@ -148,8 +161,6 @@ if [[ $version == "2.6.10" ]]; then # Install PM2 sudo npm install -g pm2 - - # Run npm start command with PM2 if pm2 start npm --name "bbb-streaming" -- start; then echo "streaming-server started successfully" @@ -159,13 +170,13 @@ if [[ $version == "2.6.10" ]]; then fi if sudo bbb-conf --restart; then - echo "BigBlueButton restarted" + echo "BigBlueButton restarted" else - echo "Error: Failed to restart BigBlueButton" - exit 1 + echo "Error: Failed to restart BigBlueButton" + exit 1 fi - - + else echo "Please use BigBlueButton 2.6.10" + exit 1 fi diff --git a/src/bigbluebutton-html5/package-lock.json b/src/bigbluebutton-html5/package-lock.json index afa156e1..19ac6b9b 100644 --- a/src/bigbluebutton-html5/package-lock.json +++ b/src/bigbluebutton-html5/package-lock.json @@ -603,6 +603,12 @@ "node": ">=4" } }, + "node_modules/@eslint/eslintrc/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/@material-ui/utils": { "version": "4.11.3", "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-4.11.3.tgz", @@ -1691,6 +1697,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/needle/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -3868,15 +3879,6 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/execa/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint-module-utils/node_modules/debug": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", @@ -4788,6 +4790,18 @@ "text-hex": "1.0.x" } }, + "node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-slot": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.0.tgz", + "integrity": "sha512-3mrKauI/tWXo1Ll+gN5dHcxDPdm/Df1ufcDLCecn+pnCIVcdWE7CujXo8QaXOWRJyZyQWWbpB8eFwHzWXlv5mQ==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-compose-refs": "1.0.0" + }, + "peerDependencies": { + "react": "^16.8 || ^17.0 || ^18.0" + } + }, "node_modules/use-sync-external-store": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", @@ -9332,6 +9346,12 @@ "requires": { "ms": "2.1.2" } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true } } }, @@ -10107,6 +10127,15 @@ "@babel/runtime": "^7.13.10", "@radix-ui/react-slot": "1.0.0" } + }, + "@radix-ui/react-slot": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.0.0.tgz", + "integrity": "sha512-3mrKauI/tWXo1Ll+gN5dHcxDPdm/Df1ufcDLCecn+pnCIVcdWE7CujXo8QaXOWRJyZyQWWbpB8eFwHzWXlv5mQ==", + "requires": { + "@babel/runtime": "^7.13.10", + "@radix-ui/react-compose-refs": "1.0.0" + } } } }, @@ -11938,12 +11967,6 @@ "shebang-regex": "^1.0.0" } }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true - }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -14022,6 +14045,11 @@ "requires": { "ms": "^2.1.1" } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" } } }, diff --git a/uninstall.sh b/uninstall.sh index 52824589..25728eb2 100644 --- a/uninstall.sh +++ b/uninstall.sh @@ -23,7 +23,7 @@ fi # Set ownership of copied files to the current user - sudo chown -R $current_user:$current_user /usr/share/meteor/bundle + sudo chown -R $current_user:$current_user /usr/share/meteor/bundle if sudo bbb-conf --restart; then echo "BigBlueButton restarted"