From 7e09a0b778fcd0e0e38b7a18b7b0cf0c1f9e1f13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Fri, 3 Feb 2023 18:24:39 +0100 Subject: [PATCH] Fix PHP deploy --- rosti.tmpl.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rosti.tmpl.sh b/rosti.tmpl.sh index 51e90ce..76bfd6d 100755 --- a/rosti.tmpl.sh +++ b/rosti.tmpl.sh @@ -99,11 +99,11 @@ function setTech() { test -e /srv/conf/nginx.d/default.conf && rm -f /srv/conf/nginx.d/default.conf # Same thing we do for nginx but if the file exist it's not rewritten. - if [ ! -e /srv/conf/nginx.d/app.conf ]; then + # Except if the file is in /srv/app, then it's moved to /srv/conf/nginx.d + if [ ! -e /srv/conf/nginx.d/app.conf -o -e /srv/app/nginx.conf ]; then mkdir -p /srv/conf/nginx.d - if [ -e /opt/examples/$tech/nginx.conf ]; then - cp /opt/examples/$tech/nginx.conf /srv/conf/nginx.d/app.conf - rm /srv/app/nginx.conf + if [ -e /srv/app/nginx.conf ]; then + mv /srv/app/nginx.conf /srv/conf/nginx.d/app.conf else cp /opt/examples/nginx/nginx.conf /srv/conf/nginx.d/app.conf fi