From 75edd0940d78a97693f0c9f88cb1c1ae973aa26f Mon Sep 17 00:00:00 2001 From: Jean Froment Date: Sun, 6 Mar 2022 20:52:50 +0100 Subject: [PATCH] Rename scheme to internalScheme --- config-updater.sh | 6 +++--- config.sample.yaml | 2 +- run-seedbox.sh | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config-updater.sh b/config-updater.sh index eb5abef..f150423 100755 --- a/config-updater.sh +++ b/config-updater.sh @@ -85,8 +85,8 @@ cat services.conf | while read line || [[ -n $line ]]; do ;; esac # Define scheme // For nextcloud, scheme must be https - scheme="http" - [[ $key == "nextcloud" ]] && scheme="https" + internalScheme="http" + [[ $key == "nextcloud" ]] && internalScheme="https" # Define service default port from bundled config file internalPort=$(cat config/ports | { grep $key || true; } | sed -r "s/^${key}: (.*)$/\1/") @@ -95,7 +95,7 @@ cat services.conf | while read line || [[ -n $line ]]; do "host": "'"$key"'.'$(echo '${TRAEFIK_DOMAIN}')'", "httpAuth": '"${defaultHttpAuth}"', "internalPort": '"${internalPort}"', - "scheme": "'"${scheme}"'" + "internalScheme": "'"${internalScheme}"'" } ]') ;; diff --git a/config.sample.yaml b/config.sample.yaml index 6c34a39..b1078b6 100644 --- a/config.sample.yaml +++ b/config.sample.yaml @@ -17,7 +17,7 @@ services: httpAuth: true internalPort: 8112 # Uncomment to specify custom schme (http by default) - # scheme: http + # internalScheme: http # Uncomment to *NOT* generate LetsEncrypt certificate (useful for local domains) # disableCertificateGeneration: true - name: flood diff --git a/run-seedbox.sh b/run-seedbox.sh index 7169c1a..4d53565 100755 --- a/run-seedbox.sh +++ b/run-seedbox.sh @@ -208,9 +208,9 @@ for json in $(yq eval -o json config.yaml | jq -c ".services[]"); do [[ ${vpn} == "true" ]] && backendHost="gluetun" # Handle custom scheme (default if non-specified is http) - scheme="http" - customScheme=$(echo $rule | jq -r .scheme) - [[ ${customScheme} != "null" ]] && scheme=${customScheme} + internalScheme="http" + customInternalScheme=$(echo $rule | jq -r .internalScheme) + [[ ${customInternalScheme} != "null" ]] && internalScheme=${customInternalScheme} # Transform the bash syntax into Traefik/go one => anything.${TRAEFIK_DOMAIN} to anything.{{ env "TRAEFIK_DOMAIN" }} hostTraefik=$(echo ${host} | sed --regexp-extended 's/^(.*)(\$\{(.*)\})/\1\{\{ env "\3" \}\}/') @@ -236,7 +236,7 @@ for json in $(yq eval -o json config.yaml | jq -c ".services[]"); do # If the specified service does not contain a "@" => we create it # If the service has a @, it means it is defined elsewhere so we do not create it (custom file, @internal...) if echo ${traefikService} | grep -vq "@"; then - echo "http.services.${ruleId}.loadBalancer.servers.0.url: ${scheme}://${backendHost}:${internalPort}" >> rules.props + echo "http.services.${ruleId}.loadBalancer.servers.0.url: ${internalScheme}://${backendHost}:${internalPort}" >> rules.props fi done