Skip to content

Commit

Permalink
Merge pull request #9 from szaimen/enh/noid/add-custom-configs
Browse files Browse the repository at this point in the history
allow to add permanent custom caddy configs
  • Loading branch information
szaimen authored Oct 20, 2023
2 parents a782b70 + d1aac8d commit 84ecc39
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 84ecc39

Please sign in to comment.