Skip to content

Commit

Permalink
Update kafka-builder.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
allamiro authored May 12, 2024
1 parent 00a4ec0 commit 91892cc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions DpipelineBuilder/kafka-builder.sh
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
#!/bin/bash
SERVER_FILE="servers.txt"
# Check if the server file exists
if [ ! -f "$SERVER_FILE" ]; then
echo "Error: Server file not found!"
exit 1
fi

# Loop through each server listed in the file and execute the update command
while read -r server; do
if [ -z "$server" ]; then
continue # skip empty lines
fi
echo "Updating files on $server..."
ssh "$server" "$UPDATE_COMMAND"
done < "$SERVER_FILE"

0 comments on commit 91892cc

Please sign in to comment.