„runupdate.sh“ ändern

This commit is contained in:
Yann Mölle 2023-04-19 19:30:23 +02:00
parent 6142263b8b
commit 040c69451b

View File

@ -1,7 +1,11 @@
#!/bin/bash #!/bin/bash
# List of server IP addresses as strings # Read the server list from the specified file
SERVER_LIST=("192.168.1.100" "192.168.1.101" "192.168.1.102") SERVER_LIST_FILE="servers"
SERVER_LIST=()
while IFS= read -r SERVER || [[ -n "$SERVER" ]]; do
SERVER_LIST+=("$SERVER")
done < "$SERVER_LIST_FILE"
# Loop through the server list # Loop through the server list
for SERVER in "${SERVER_LIST[@]}" for SERVER in "${SERVER_LIST[@]}"