+3
-3
cmd/bigsky/sync_pds.sh
+3
-3
cmd/bigsky/sync_pds.sh
···
19
19
exit -1
20
20
fi
21
21
22
-
echo "resync $1"
23
-
http --quiet post https://${RELAY_HOST}/admin/pds/resync Authorization:"Bearer ${RELAY_ADMIN_KEY}" \
24
-
host=$1
22
+
echo "POST resync $1"
23
+
http --ignore-stdin post https://${RELAY_HOST}/admin/pds/resync Authorization:"Bearer ${RELAY_ADMIN_KEY}" \
24
+
host==$1
+24
cmd/bigsky/sync_status_pds.sh
+24
cmd/bigsky/sync_status_pds.sh
···
1
+
#!/usr/bin/env bash
2
+
3
+
set -e # fail on error
4
+
set -u # fail if variable not set in substitution
5
+
set -o pipefail # fail if part of a '|' command fails
6
+
7
+
if test -z "${RELAY_ADMIN_KEY}"; then
8
+
echo "RELAY_ADMIN_KEY secret is not defined"
9
+
exit -1
10
+
fi
11
+
12
+
if test -z "${RELAY_HOST}"; then
13
+
echo "RELAY_HOST config not defined"
14
+
exit -1
15
+
fi
16
+
17
+
if test -z "$1"; then
18
+
echo "expected PDS hostname as an argument"
19
+
exit -1
20
+
fi
21
+
22
+
echo "GET resync $1"
23
+
http --ignore-stdin --pretty all get https://${RELAY_HOST}/admin/pds/resync Authorization:"Bearer ${RELAY_ADMIN_KEY}" \
24
+
host==$1