Skip to content

Commit

Permalink
scripts: improve detecting disconnect after sysupgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Noki committed Jan 10, 2025
1 parent 2c58495 commit e66b812
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mass-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ for FILE_PATH in "${SORTED_FILES[@]}"; do
# Debug output: Executing sysupgrade
echo "Executing sysupgrade on $HOSTNAME"
# shellcheck disable=SC2029
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "root@$HOSTNAME" "sysupgrade '/tmp/$FILENAME'"
# Perform the sysupgrade; Ensure the connection terminates within 5 seconds using keep-alive
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ServerAliveInterval=1 -o ServerAliveCountMax=5 "root@$HOSTNAME" "sysupgrade '/tmp/$FILENAME'"

# Wait for hostname to become unreachable
echo "Waiting for $HOSTNAME to become unreachable..."
Expand Down

0 comments on commit e66b812

Please sign in to comment.