Skip to content

Commit 38035dc

Browse files
committed
disable tls when no domain name
1 parent 122a857 commit 38035dc

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • content/service/caddy

content/service/caddy/run

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ if [[ ! -f "/mnt/data/config/caddy/Caddyfile" ]]; then
4242
cp /workdir/Caddyfile /mnt/data/config/caddy/
4343
fi
4444

45+
if [ "${CADDY_DOMAIN}" = "" ]; then
46+
sed -i 's|tls '{'$CADDY_EMAIL'}'||' /mnt/data/config/caddy/Caddyfile
47+
fi
48+
4549
cp -f /mnt/data/config/caddy/Caddyfile /tmp/Caddyfile
4650
HASH="$(caddy hash-password --plaintext ${GLOBAL_PASSWORD})"
4751
sed -i "s|HASH|${HASH}|g" /tmp/Caddyfile

0 commit comments

Comments
 (0)