From 4c3e77ab4117d75386487120584cdd48bf54baf1 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 31 Dec 2019 16:55:06 +0100 Subject: [PATCH] Allow to set redirect to ssl on mass vhosts --- Dockerfile | 2 +- data/create-vhost.sh | 5 +++-- data/docker-entrypoint.sh | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 303bb48..4009154 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ LABEL \ ### ### Build arguments ### -ARG VHOST_GEN_GIT_REF=0.15 +ARG VHOST_GEN_GIT_REF=0.16 ARG CERT_GEN_GIT_REF=0.7 ENV BUILD_DEPS \ diff --git a/data/create-vhost.sh b/data/create-vhost.sh index a0a0220..b8f58d7 100755 --- a/data/create-vhost.sh +++ b/data/create-vhost.sh @@ -11,7 +11,8 @@ VHOST_TPL="${4}" CA_KEY="${5}" CA_CRT="${6}" GENERATE_SSL="${7}" -VERBOSE="${8:-}" +GEN_MODE="${8}" +VERBOSE="${9:-}" if [ "${GENERATE_SSL}" = "1" ]; then if [ ! -d "/etc/httpd/cert/mass" ]; then @@ -29,7 +30,7 @@ if [ "${GENERATE_SSL}" = "1" ]; then fi fi -cmd="vhost_gen.py -p \"${VHOST_PATH}\" -n \"${VHOST_NAME}\" -c /etc/vhost-gen/mass.yml -o \"${VHOST_TPL}\" -s ${VERBOSE} -m both" +cmd="vhost_gen.py -p \"${VHOST_PATH}\" -n \"${VHOST_NAME}\" -c /etc/vhost-gen/mass.yml -o \"${VHOST_TPL}\" -s ${VERBOSE} -m ${GEN_MODE}" if [ -n "${VERBOSE}" ]; then echo "\$ ${cmd}" fi diff --git a/data/docker-entrypoint.sh b/data/docker-entrypoint.sh index 38b1ee4..a82d989 100755 --- a/data/docker-entrypoint.sh +++ b/data/docker-entrypoint.sh @@ -244,7 +244,7 @@ if [ "${MASS_VHOST_ENABLE}" -eq "1" ]; then fi # Create watcherd sub commands - watcherd_add="create-vhost.sh '%%p' '%%n' '${MASS_VHOST_TLD}' '%%p/${MASS_VHOST_TPL}/' '${CA_KEY}' '${CA_CRT}' '1' '${verbose}'" + watcherd_add="create-vhost.sh '%%p' '%%n' '${MASS_VHOST_TLD}' '%%p/${MASS_VHOST_TPL}/' '${CA_KEY}' '${CA_CRT}' '1' '${MASS_VHOST_SSL_TYPE}' '${verbose}'" watcherd_del="rm /etc/httpd/vhost.d/%%n.conf" watcherd_tri="${HTTPD_RELOAD}"