Add scripts from disk
This commit is contained in:
21
script/VerifyUpstreamPuller.sh
Normal file
21
script/VerifyUpstreamPuller.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
RSYNC_URL="rsync://delta:874/archlinux"
|
||||
attempt=1
|
||||
max_attempts=3
|
||||
reached=false
|
||||
|
||||
while [ $attempt -le $max_attempts ] && [ "$reached" = false ]; do
|
||||
if rsync --dry-run --timeout=10 "$RSYNC_URL" 2>/dev/null; then
|
||||
reached=true
|
||||
echo "OK"
|
||||
else
|
||||
echo "$attempt KO"
|
||||
attempt=$((attempt + 1))
|
||||
sleep 10
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$reached" = false ]; then
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
Reference in New Issue
Block a user