From 976c44838eb5482c3737fe02475424e0691a842a Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 3 Mar 2024 20:21:50 -0500 Subject: [PATCH] Fix bugs in setup script #10 --- client/setup.sh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/client/setup.sh b/client/setup.sh index f1756fc..c100d41 100644 --- a/client/setup.sh +++ b/client/setup.sh @@ -25,16 +25,9 @@ prompt_user() { # Function to prompt user for capabilities options and store the result in a variable prompt_capabilities() { - options=("radio" "placeholder1" "placeholder2") # Add more options as needed - echo "Select the capabilities of this node (comma-separated):" - select option in "${options[@]}"; do - if [[ "$option" ]]; then - capabilities="$option" - break - else - echo "Invalid selection. Please try again." - fi - done + default_capabilities="radio" # Default value + read -p "Select CLIENT_CAPABILITIES (comma-separated, default: $default_capabilities): " capabilities + capabilities="${capabilities:-$default_capabilities}" # Use default value if input is empty echo "$capabilities" } @@ -120,6 +113,7 @@ systems_json="${systems_json%,}" # Remove trailing comma systems_json+="}" # Append the created systems to the presets file +mkdir ./config echo "$systems_json" >> "./config/radioPresets.json" echo "Systems added to radioPresets.json." @@ -149,7 +143,7 @@ echo "$service_content" > /etc/systemd/system/discord-radio-bot.service systemctl daemon-reload systemctl stop discord-radio-bot.service -echo "Discord Client Node install completed!" +echo "\n\n\t\tDiscord Client Node install completed!\n\n" ####------------------- OP25 Installation # Clone OP25 from the git repository @@ -195,4 +189,4 @@ systemctl stop op25-multi_rx.service echo "Installing OP25..." ./install.sh -echo "OP25 installation completed!" \ No newline at end of file +echo "\n\n\t\tOP25 installation completed!\n\n" \ No newline at end of file