wait for machine to be shutdown after deploy

This commit is contained in:
Jörg Thalheim 2023-03-04 17:09:20 +01:00
parent b7e335a5f8
commit 5be3e00d57

View File

@ -321,3 +321,8 @@ nixos-install --no-root-passwd --no-channel-copy --system "$nixos_system"
# This makes integration into scripts easier
nohup bash -c '${maybe_reboot}' >/dev/null &
SSH
# wait for machine to become unreachable due to reboot
if [[ -n ${maybe_reboot} ]]; then
while timeout_ssh_ -- exit 0; do sleep 1; done
fi