diff --git a/assemble b/assemble index 8d0ee5c944d832c468e5a97b80361ea9e4cba1a9..e0f444a871cc2cb25c4df6608e75136a70c05502 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