Fix start if dir already exists.

This commit is contained in:
redxef 2021-02-06 16:31:52 +01:00
parent 92ed8ce54a
commit af9cc470fb
2 changed files with 1 additions and 2 deletions

View file

@ -1,5 +1,4 @@
FROM alpine:latest
LABEL homepage=https://git.redxef.duckdns.org/
RUN apk update && apk upgrade && apk add nginx gettext && \
rm -r /etc/nginx

View file

@ -25,7 +25,7 @@ sub_env_vars="$(cat /environment_variables.txt)"
echo "Enabling servers"
(
cd "/etc/nginx/sites-available" || exit $?
mkdir "../sites-enabled" || exit $?
test -d "../sites-enabled" || mkdir "../sites-enabled"
for f in *.conf; do
envsubst "$sub_env_vars" < "$f" > "../sites-enabled/$f"
done