From 292750ae80399eff0e1f8e0f6cf77c12cb5be64a Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 20 May 2022 13:29:35 +0200 Subject: [PATCH] Add reboot step --- scripts/remote_switch.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/remote_switch.sh b/scripts/remote_switch.sh index 037de0c..7dd8c84 100755 --- a/scripts/remote_switch.sh +++ b/scripts/remote_switch.sh @@ -33,3 +33,14 @@ do echo echo done +for host in "${hosts[@]}" +do + fqdn="$host.2li.local" + if [ $host == "nixos-management" ]; then + continue + fi + echo "reboot $fqdn" + ssh -i rsa_key 'sudo reboot' + echo + echo +done