Skip to content

Commit

Permalink
allow to add permanent custom caddy configs
Browse files Browse the repository at this point in the history
Signed-off-by: Simon L <[email protected]>
  • Loading branch information
szaimen committed Oct 19, 2023
1 parent a782b70 commit d1aac8d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ https://bw.{\$NC_DOMAIN}:443 {
CADDY
fi

mkdir -p /data/caddy-imports
if ! grep -q "/data/caddy-imports" /Caddyfile; then
echo 'import /data/caddy-imports/*' >> /Caddyfile
# Make sure that the caddy-imports dir is not empty
echo "# empty file so that caddy does not print a warning" > /data/caddy-imports/empty
fi

if [ "$FILTER_SET" = 1 ] && [ "$FILE_THERE" = 1 ]; then
CADDYFILE="$(sed "s|allow_countries.*|allow_countries $ALLOW_CONTRIES|;s|# import GEOFILTER| import GEOFILTER|" /Caddyfile)"
else
Expand Down

0 comments on commit d1aac8d

Please sign in to comment.