Skip to content

Commit

Permalink
disable tls when no domain name
Browse files Browse the repository at this point in the history
  • Loading branch information
wy580477 committed Aug 10, 2024
1 parent 122a857 commit 3787190
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content/service/caddy/run
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ if [[ ! -f "/mnt/data/config/caddy/Caddyfile" ]]; then
cp /workdir/Caddyfile /mnt/data/config/caddy/
fi

if [ "${CADDY_DOMAIN}" = " ]; then
sed -i 's|tls '{'$CADDY_EMAIL'}'||' /mnt/data/config/caddy/Caddyfile
fi
cp -f /mnt/data/config/caddy/Caddyfile /tmp/Caddyfile
HASH="$(caddy hash-password --plaintext ${GLOBAL_PASSWORD})"
sed -i "s|HASH|${HASH}|g" /tmp/Caddyfile
Expand Down

0 comments on commit 3787190

Please sign in to comment.