Fix PHP deploy
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
Adam Štrauch 2023-02-03 18:24:39 +01:00
parent d2333b2b3a
commit 7e09a0b778
Signed by: cx
GPG Key ID: 018304FFA8988F8D

View File

@ -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