Don't overwrite external index.html

This commit is contained in:
Nico Schottelius 2019-12-15 01:00:03 +01:00
parent 6023686304
commit 4a6b75d8f3

View file

@ -61,14 +61,16 @@ EOF
# create empty file - can be overriden by others
touch /etc/nginx/https.conf
cat > "${wwwroot}/index.html" <<EOF
# Do not overwrite if external volume is used!
if [ ! -e ${wwwroot}/index.html ]; then
cat > "${wwwroot}/index.html" <<EOF
Welcome to ${dnsname} running with IPv6+LetsEncrypt.
Find more about fully automated docker containers with letsencrypt certificates on
https://ungleich.ch/u/blog/fully-automated-ssl-certificates-for-docker/
EOF
fi
# restart and run now with cert
pkill nginx