From e4a82280bb8a1b36753b57ed1685eb81e65efe0e Mon Sep 17 00:00:00 2001 From: Jesse Bowling Date: Thu, 13 Jun 2019 20:49:01 -0400 Subject: [PATCH] In which our hero uses fancy braces expansion to remove port specification from the SERVER variable used for certbot bootstrap. Signed-off-by: Jesse Bowling --- nginx.run | 1 + 1 file changed, 1 insertion(+) diff --git a/nginx.run b/nginx.run index 4da8617..843c098 100644 --- a/nginx.run +++ b/nginx.run @@ -13,6 +13,7 @@ trap "exit 143" SIGTERM PIDFILE=/var/run/nginx.pid SERVER_BASE_URL=${SERVER_BASE_URL:-http://$(curl http://httpbin.org/ip | jq -r .origin)} SERVER=$(echo ${SERVER_BASE_URL} | awk -F/ '{print $3}') +SERVER="${SERVER%%:*}" # Should we be doing this this way? # What should we do to cleanup in a container?