Skip to content

Commit

Permalink
More available archive check for rsync case (#770)
Browse files Browse the repository at this point in the history
* This check for archive_is_available is more reliable than ICMP ping as many ISPs block that traffic but don't block ssh traffic

* force 1 second timeout so we don't block
  • Loading branch information
Xatter authored Jul 22, 2023
1 parent a5e8e15 commit d6fed34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run/rsync_archive/archive-is-reachable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

ARCHIVE_HOST_NAME="$1"

ping -q -w 1 -c 1 "$ARCHIVE_HOST_NAME" > /dev/null 2>&1
ssh -q -o ConnectTimeout=1 "$RSYNC_USER"@"$ARCHIVE_HOST_NAME" exit

0 comments on commit d6fed34

Please sign in to comment.