Fix bugs in setup script #10

This commit is contained in:
Logan Cusano
2024-03-03 20:21:50 -05:00
parent 1395130d6d
commit 976c44838e

View File

@@ -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!"
echo "\n\n\t\tOP25 installation completed!\n\n"