@@ -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
The note is not visible to the blocked user.