From 040c69451bb8a8529ce62c9d670be99c5353bae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20M=C3=B6lle?= Date: Wed, 19 Apr 2023 19:30:23 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9Erunupdate.sh=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runupdate.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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[@]}"