diff --git a/script/deploy.sh b/script/deploy.sh index 67a2b0a..85b3614 100755 --- a/script/deploy.sh +++ b/script/deploy.sh @@ -80,6 +80,22 @@ cleanup() { echo -e "\n 🌟 Thanks for using Numbus, consider supporting the project !" } +launch_gui() { + echo -e "\n 🚀 Launching Numbus Configurator..." + echo -e " ➡️ You will now proceed to the configuration of your device through your browser" + + python3 "${BRIDGE_SCRIPT}" >> "${STDOUT}" 2>> "${STDERR}" & + export BRIDGE_PID=$! + + local START_URL="http://localhost:${WEBSERVER_PORT}/pages/index.html" + + xdg-open "${START_URL}" >> "${STDOUT}" 2>> "${STDERR}" || open "${START_URL}" >> "${STDOUT}" 2>> "${STDERR}" || true + + sleep 5 + + echo -e "\n ⚠️ If it doesn't automatically, open your browser at: $(gum style "${START_URL}")" +} + hierarchy_preparation() { echod "\n 🔄 Preparing the folder hierarchy for the final configuration..." @@ -382,25 +398,6 @@ SSHEND -# --- MAIN WEB FUNCTIONS ---> -launch_gui() { - echo -e "\n 🚀 Launching Numbus Configurator..." - echo -e " ➡️ You will now proceed to the configuration of your device through your browser" - - python3 "${BRIDGE_SCRIPT}" >> "${STDOUT}" 2>> "${STDERR}" & - export BRIDGE_PID=$! - - local START_URL="http://localhost:${WEBSERVER_PORT}/pages/index.html" - - xdg-open "${START_URL}" >> "${STDOUT}" 2>> "${STDERR}" || open "${START_URL}" >> "${STDOUT}" 2>> "${STDERR}" || true - - sleep 5 - - echo -e "\n ⚠️ If it doesn't automatically, open your browser at: $(gum style --foreground 212 "${START_URL}")" -} -# --- MAIN WEB FUNCTIONS ---< - - # --- MAIN SCRIPT FUNCTIONS ---> server_config_generation() { @@ -559,7 +556,7 @@ cloudflare_dns_setup() { local SUBDOMAIN="${1}" gum style --border normal --margin "1" --padding "1 2" --border-foreground 212 " - ⚠️ $(gum style --foreground 212 'WARNING:') One or more existing type A DNS records found for \`${SUBDOMAIN}\`. + ⚠️ $(gum style 'WARNING:') One or more existing type A DNS records found for \`${SUBDOMAIN}\`. This script can clear those DNS records for you and create the correct ones needed for the server. If you are unsure that these records are actually in use, please select \"no\"." gum confirm "Select \"yes\" to clear ALL EXISTING type A DNS records for this subdomain and automatically create the correct ones." \ @@ -731,7 +728,7 @@ EOF fi gum style --border normal --margin "1" --padding "1 2" --border-foreground 212 " - ⚠️ $(gum style --foreground 212 'WARNING:') You will now set the password of the numbus-admin user. + ⚠️ $(gum style 'WARNING:') You will now set the password of the numbus-admin user. You will almost never user it. Consider using a very strong password : you can write it down securely on a hidden sheet of paper or add it to your password manager (locally with Passbolt with any other online password manager provider)."