autoconf - fix certbot bug when multiple server_name for one service
This commit is contained in:
parent
69fe066777
commit
02f9fbe5fc
@ -95,7 +95,7 @@ class Config :
|
|||||||
vars_defaults.update(vars_instances)
|
vars_defaults.update(vars_instances)
|
||||||
vars_defaults.update(vars)
|
vars_defaults.update(vars)
|
||||||
# Call site-config.sh to generate the config
|
# Call site-config.sh to generate the config
|
||||||
proc = subprocess.run(["/bin/su", "-s", "/bin/sh", "-c", "/opt/entrypoint/site-config.sh" + " " + vars["SERVER_NAME"], "nginx"], env=vars_defaults, capture_output=True)
|
proc = subprocess.run(["/bin/su", "-s", "/bin/sh", "-c", "/opt/entrypoint/site-config.sh" + " \"" + vars["SERVER_NAME"] + "\"", "nginx"], env=vars_defaults, capture_output=True)
|
||||||
if proc.returncode == 0 and vars_defaults["MULTISITE"] == "yes" and self.__swarm :
|
if proc.returncode == 0 and vars_defaults["MULTISITE"] == "yes" and self.__swarm :
|
||||||
proc = subprocess.run(["/bin/su", "-s", "/opt/entrypoint/multisite-config.sh", "nginx"], env=vars_defaults, capture_output=True)
|
proc = subprocess.run(["/bin/su", "-s", "/opt/entrypoint/multisite-config.sh", "nginx"], env=vars_defaults, capture_output=True)
|
||||||
if proc.returncode == 0 :
|
if proc.returncode == 0 :
|
||||||
|
|||||||
@ -9,10 +9,7 @@
|
|||||||
# get nginx path and override multisite variables
|
# get nginx path and override multisite variables
|
||||||
NGINX_PREFIX="/etc/nginx/"
|
NGINX_PREFIX="/etc/nginx/"
|
||||||
if [ "$MULTISITE" = "yes" ] ; then
|
if [ "$MULTISITE" = "yes" ] ; then
|
||||||
first_server="$1"
|
|
||||||
if [ ! -f "/usr/sbin/nginx" ] ; then
|
|
||||||
first_server=$(echo "$1" | cut -d ' ' -f 1)
|
first_server=$(echo "$1" | cut -d ' ' -f 1)
|
||||||
fi
|
|
||||||
NGINX_PREFIX="${NGINX_PREFIX}${first_server}/"
|
NGINX_PREFIX="${NGINX_PREFIX}${first_server}/"
|
||||||
if [ ! -d "$NGINX_PREFIX" ] ; then
|
if [ ! -d "$NGINX_PREFIX" ] ; then
|
||||||
mkdir "$NGINX_PREFIX"
|
mkdir "$NGINX_PREFIX"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user