Skip to content

Commit

Permalink
Merge pull request #27 from AiroPi/main
Browse files Browse the repository at this point in the history
Add jellyfin to the Caddyfile automatically
  • Loading branch information
szaimen authored Feb 23, 2024
2 parents c218650 + a701806 commit 584e230
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,22 @@ https://mail.{\$NC_DOMAIN}:443 {
CADDY
fi

if [ -n "$(dig A +short nextcloud-aio-jellyfin)" ] && ! grep -q nextcloud-aio-jellyfin /Caddyfile; then
cat << CADDY >> /Caddyfile
https://media.{\$NC_DOMAIN}:443 {
# import GEOFILTER
reverse_proxy nextcloud-aio-jellyfin:8096
# TLS options
tls {
issuer acme {
disable_http_challenge
}
}
}
CADDY
fi

mkdir -p /data/caddy-imports
if ! grep -q "/data/caddy-imports" /Caddyfile; then
echo 'import /data/caddy-imports/*' >> /Caddyfile
Expand Down

0 comments on commit 584e230

Please sign in to comment.