diff --git a/runupdate.sh b/runupdate.sh index bede099..08c3cac 100644 --- a/runupdate.sh +++ b/runupdate.sh @@ -1,7 +1,11 @@ #!/bin/bash -# List of server IP addresses as strings -SERVER_LIST=("192.168.1.100" "192.168.1.101" "192.168.1.102") +# Read the server list from the specified file +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 for SERVER in "${SERVER_LIST[@]}"