File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/server_manager/install_scripts Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -408,15 +408,17 @@ function add_api_url_to_config() {
408
408
}
409
409
410
410
function check_firewall() {
411
- # TODO(JonathanDCohen) This is incorrect if access keys are using more than one port.
412
- local -i ACCESS_KEY_PORT
413
- ACCESS_KEY_PORT=$( fetch --insecure " ${LOCAL_API_URL} /access-keys" |
411
+ local -i ACCESS_KEY_PORT= " ${FLAGS_KEYS_PORT} "
412
+ if [[ -z " ${ ACCESS_KEY_PORT} " ]] ; then
413
+ ACCESS_KEY_PORT=$( fetch --insecure " ${LOCAL_API_URL} /access-keys" |
414
414
docker exec -i " ${CONTAINER_NAME} " node -e '
415
415
const fs = require("fs");
416
416
const accessKeys = JSON.parse(fs.readFileSync(0, {encoding: "utf-8"}));
417
417
console.log(accessKeys["accessKeys"][0]["port"]);
418
418
' ) || return
419
+ fi
419
420
readonly ACCESS_KEY_PORT
421
+
420
422
if ! fetch --max-time 5 --cacert " ${SB_CERTIFICATE_FILE} " " ${PUBLIC_API_URL} /access-keys" > /dev/null; then
421
423
log_error " BLOCKED"
422
424
FIREWALL_STATUS=" \
You can’t perform that action at this time.
0 commit comments