Bladeren bron

Now prompts for OCB URL, and defaults port number to 8081

deadtom 1 maand geleden
bovenliggende
commit
4d50844b4c
1 gewijzigde bestanden met toevoegingen van 6 en 3 verwijderingen
  1. 6 3
      install.sh

+ 6 - 3
install.sh

@@ -7,7 +7,7 @@ check_venv() {  # Check if the venv module is available
     if python3 -c "import venv" &> /dev/null; then
         return 0
     else
-        echo "The 'venv' module is not available. Please ensure you are using Python 3.3 or later."
+        echo "The 'venv' module is not available. If using Debian, be sure to install python3-venv."
         return 1
     fi
 }
@@ -80,6 +80,8 @@ update_config() {  # Generate key for SECRET_KEY
         echo "Failed to set ACCESS_ID."
         exit 1  # Exit the script with a non-zero status
     fi
+
+    read -p "Enter the external URL your OwnchatBot will be using, with \"https://\": " OCB_URL
 }
 
 read -p "This app includes an option to integrate Kofi donations and membership rewards into your stream. If you use this feature, you acknowledge that you alone are responsible for backing up and securing the OwnchatBot folder, so as not to lose any data related to rewards your viewiers earned by spending money on Kofi. The developer(s) of OwnchatBot assume no responsibility for any loss of such data. Do you agree to these terms? Type \"yes\" or \"no\": " agreement  # Prompt the user to accept the agreement
@@ -106,7 +108,8 @@ mkdir instance/assets  # Create upload folder for alert images
 SECRET_KEY=$(generate_key)
 update_config "SECRET_KEY" "$SECRET_KEY"
 
-read -p "Please enter the port number you would like OwnchatBot to listen on: " OCB_PORT
+read -p "Please enter the port number you would like OwnchatBot to listen on (default: 8081): " OCB_PORT
+OCB_PORT=${OCB_PORT:-8081}
 
 echo "
 You're ready to start OwnchatBot! Run:
@@ -115,7 +118,7 @@ env/bin/python -m gunicorn --error-logfile ownchatbot.log -b 0.0.0.0:$OCB_PORT -
 
 To configure your bot, go to:
 
-http://localhost:$OCB_PORT/mgmt
+$OCB_URL:$OCB_PORT/mgmt
 
 Login to using your owncast admin name and password.
 "