From 04c3923e4fc6f54bcc356d725a8fa269a996697b Mon Sep 17 00:00:00 2001 From: gyurix Date: Thu, 2 Dec 2021 13:25:16 +0000 Subject: [PATCH] Fixing if statement definitions. --- proxy.json | 1 + scripts/check_proxy_state.sh | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/proxy.json b/proxy.json index 042883a..aea1f21 100644 --- a/proxy.json +++ b/proxy.json @@ -1,6 +1,7 @@ { "proxy_scheduler": { "DOCKER_REGISTRY_URL": "registry.format.hu", + "PROXY_TYPE": "", "LETSENCRYPT_URL": "letsencrypt.org", "CERT_DIR": "/keys", "DOMAIN_DIR": "/domains", diff --git a/scripts/check_proxy_state.sh b/scripts/check_proxy_state.sh index 621c9aa..e1ee0ae 100755 --- a/scripts/check_proxy_state.sh +++ b/scripts/check_proxy_state.sh @@ -4,7 +4,7 @@ DATE=`date +%F-%H-%M-%S` TIMEOUT=$TIMEOUT RESTART=$RESTART RESTART_COUNTER=0 -DOCKER_REGISTRY_URL=$DOCKER_REGISTRY_URL +REGISTRY_URL=$DOCKER_REGISTRY_URL # Set env variables DOMAIN="$1" @@ -15,11 +15,11 @@ PROXY_CONFIG_DIR=$PROXY_CONFIG_DIR # Setup docker registry url path -if [[ ! -n "$DOCKER_REGISTRY_URL" && "$DOCKER_REGISTRY_URL" != "null" ]] ; then +if [[ ! -n "$REGISTRY_URL" ]] && [[ "$REGISTRY_URL" != "null" ]] ; then SETUP="'/setup'"; else SETUP="setup"; - $DOCKER_REGISTRY_URL=""; + $REGISTRY_URL=""; fi service_exec="docker run --rm -v /etc/user/config/services/:/services/:ro -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker:ro registry.format.hu/setup /scripts/service-exec"