Fix bugs in setup script #10
This commit is contained in:
@@ -25,16 +25,9 @@ prompt_user() {
|
|||||||
|
|
||||||
# Function to prompt user for capabilities options and store the result in a variable
|
# Function to prompt user for capabilities options and store the result in a variable
|
||||||
prompt_capabilities() {
|
prompt_capabilities() {
|
||||||
options=("radio" "placeholder1" "placeholder2") # Add more options as needed
|
default_capabilities="radio" # Default value
|
||||||
echo "Select the capabilities of this node (comma-separated):"
|
read -p "Select CLIENT_CAPABILITIES (comma-separated, default: $default_capabilities): " capabilities
|
||||||
select option in "${options[@]}"; do
|
capabilities="${capabilities:-$default_capabilities}" # Use default value if input is empty
|
||||||
if [[ "$option" ]]; then
|
|
||||||
capabilities="$option"
|
|
||||||
break
|
|
||||||
else
|
|
||||||
echo "Invalid selection. Please try again."
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
echo "$capabilities"
|
echo "$capabilities"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,6 +113,7 @@ systems_json="${systems_json%,}" # Remove trailing comma
|
|||||||
systems_json+="}"
|
systems_json+="}"
|
||||||
|
|
||||||
# Append the created systems to the presets file
|
# Append the created systems to the presets file
|
||||||
|
mkdir ./config
|
||||||
echo "$systems_json" >> "./config/radioPresets.json"
|
echo "$systems_json" >> "./config/radioPresets.json"
|
||||||
|
|
||||||
echo "Systems added to 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 daemon-reload
|
||||||
systemctl stop discord-radio-bot.service
|
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
|
####------------------- OP25 Installation
|
||||||
# Clone OP25 from the git repository
|
# Clone OP25 from the git repository
|
||||||
@@ -195,4 +189,4 @@ systemctl stop op25-multi_rx.service
|
|||||||
echo "Installing OP25..."
|
echo "Installing OP25..."
|
||||||
./install.sh
|
./install.sh
|
||||||
|
|
||||||
echo "OP25 installation completed!"
|
echo "\n\n\t\tOP25 installation completed!\n\n"
|
||||||
Reference in New Issue
Block a user