made reboot multihost

This commit is contained in:
2026-04-14 11:35:38 +02:00
parent e107692eca
commit a5428fca53

View File

@@ -1,6 +1,15 @@
#/usr/bin/env bash
#!/usr/bin/env bash
set -e
ssh $1 << EOF
if [ $# -eq 0 ]; then
echo "Usage: $0 <host1> [host2] [host3] ..."
exit 1
fi
for HOST in "$@"; do
echo "Rebooting $HOST..."
ssh "$HOST" << EOF
reboot
EOF
echo "Reboot initiated on $HOST"
done