From df049ca4735bbfebff65a3a328d74aee58644027 Mon Sep 17 00:00:00 2001 From: Nikos Kasioumis <nikos.kasioumis@cern.ch> Date: Fri, 2 Aug 2019 16:31:49 +0000 Subject: [PATCH] Take the Nginx configuration files into account * Look for and move Nginx configuration files back into the standard directory such that the original assemble script will take them into account. --- assemble | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/assemble b/assemble index 8d0ee5c..e0f444a 100755 --- a/assemble +++ b/assemble @@ -18,11 +18,31 @@ mv /tmp/src /tmp/src-original cd /tmp/src-original/ /opt/rh/rh-python36/root/usr/bin/mkdocs build --clean --site-dir /tmp/src/ +# Move the Nginx-related files back to the standard directory. +if [ -f ./nginx.conf ]; then + echo "---> Moving nginx.conf configuration file..." + mv ./nginx.conf /tmp/src/nginx.conf +fi +if [ -d ./nginx-cfg ]; then + echo "---> Moving nginx configuration files..." + mv ./nginx-cfg /tmp/src/nginx-cfg +fi +if [ -d ./nginx-default-cfg ]; then + echo "---> Moving nginx default server configuration files..." + mv ./nginx-default-cfg /tmp/src/nginx-default-cfg +fi +if [ -d ./nginx-start ]; then + echo "---> Moving nginx start-hook scripts..." + mv ./nginx-start /tmp/src/nginx-start +fi + # Configure nginx to not specify the port in absolute redirects. -mkdir /tmp/src/nginx-default-cfg/ +if [ ! -f /tmp/src/nginx-default-cfg/redirect.conf ]; then +mkdir --parents /tmp/src/nginx-default-cfg/ cat <<EOF> /tmp/src/nginx-default-cfg/redirect.conf port_in_redirect off; EOF +fi # Go back to the current directory. cd $cwd -- GitLab