mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
autoconf - fix certbot bug when multiple server_name for one service
This commit is contained in:
parent
69fe066777
commit
02f9fbe5fc
2 changed files with 2 additions and 5 deletions
|
@ -95,7 +95,7 @@ class Config :
|
|||
vars_defaults.update(vars_instances)
|
||||
vars_defaults.update(vars)
|
||||
# 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 :
|
||||
proc = subprocess.run(["/bin/su", "-s", "/opt/entrypoint/multisite-config.sh", "nginx"], env=vars_defaults, capture_output=True)
|
||||
if proc.returncode == 0 :
|
||||
|
|
|
@ -9,10 +9,7 @@
|
|||
# get nginx path and override multisite variables
|
||||
NGINX_PREFIX="/etc/nginx/"
|
||||
if [ "$MULTISITE" = "yes" ] ; then
|
||||
first_server="$1"
|
||||
if [ ! -f "/usr/sbin/nginx" ] ; then
|
||||
first_server=$(echo "$1" | cut -d ' ' -f 1)
|
||||
fi
|
||||
first_server=$(echo "$1" | cut -d ' ' -f 1)
|
||||
NGINX_PREFIX="${NGINX_PREFIX}${first_server}/"
|
||||
if [ ! -d "$NGINX_PREFIX" ] ; then
|
||||
mkdir "$NGINX_PREFIX"
|
||||
|
|
Loading…
Reference in a new issue