summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-08-20 09:58:08 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-08-20 09:58:08 +0200
commit543c13fa1988565877b483ee001b4ff1c3e12a22 (patch)
treee11bec0597b211b5bb67671adf9cf370178b702f /scripts
parent5f0b7c5fb5a40341f24ca00afaac789c614a6830 (diff)
Fixed GPG keyserver intermittenly failure
Workaround about issue with the particular GPG keyserver: trying several explicit keyservers until the command succeeds Change-Id: If0eba5e7a123ea56ee0adadeb69ab7c89301ae5c Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/get-syncthing.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/get-syncthing.sh b/scripts/get-syncthing.sh
index 5362573..433a88d 100755
--- a/scripts/get-syncthing.sh
+++ b/scripts/get-syncthing.sh
@@ -60,7 +60,17 @@ if [ "$?" != 0 ]; then
exit 1
fi
-${GPG} -q --keyserver pool.sks-keyservers.net --recv-keys 37C84554E7E0A261E4F76E1ED26E6ED000654A3E || exit 1
+# Workaround about issue with the particular GPG keyserver:
+# trying several explicit keyservers until the command succeeds
+# (see https://github.com/jacobalberty/unifi-docker/issues/64)
+for server in $(shuf -e pool.sks-keyservers.net \
+ ha.pool.sks-keyservers.net \
+ hkp://p80.pool.sks-keyservers.net:80 \
+ keyserver.ubuntu.com \
+ hkp://keyserver.ubuntu.com:80 \
+ pgp.mit.edu) ; do
+ ${GPG} -q --keyserver "$server" --recv-keys 37C84554E7E0A261E4F76E1ED26E6ED000654A3E && break || :
+done
tarball="syncthing-${GOOS_ST}-${GOARCH}-v${SYNCTHING_VERSION}.${TB_EXT}" \
&& curl --connect-timeout 60 --retry 3 -sfSL "https://github.com/syncthing/syncthing/releases/download/v${SYNCTHING_VERSION}/${tarball}" -O \