Skip to content

Commit

Permalink
arrs: allow access to /feed/calendar via NGINX (#1052)
Browse files Browse the repository at this point in the history
* allow access to /feed/calendar via NGINX

* fix app name typos, merge with bakerboy nginx
  • Loading branch information
mchangrh committed Aug 2, 2023
1 parent b2e61cd commit 9dc0c50
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 14 deletions.
8 changes: 8 additions & 0 deletions scripts/nginx/lidarr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ location ^~ /$app_baseurl/api {
auth_basic off;
proxy_pass http://127.0.0.1:$app_port;
}
# Allow Calendar Feed External Access via NGINX
location ^~ /$app_baseurl/feed/calendar {
auth_basic off;
proxy_pass http://127.0.0.1:$app_port;
}
ARRNGINX

wasActive=$(systemctl is-active $app_servicefile)
Expand Down
7 changes: 7 additions & 0 deletions scripts/nginx/radarr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ location ^~ /$app_baseurl/api {
proxy_pass http://127.0.0.1:$app_port;
}
# Allow Calendar Feed External Access via NGINX
location ^~ /$app_baseurl/feed/calendar {
auth_basic off;
proxy_pass http://127.0.0.1:$app_port;
}
ARRNGINX

wasActive=$(systemctl is-active $app_servicefile)
Expand Down
7 changes: 7 additions & 0 deletions scripts/nginx/readarr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ location ^~ /$app_baseurl/api {
proxy_pass http://127.0.0.1:$app_port;
}
# Allow Calendar Feed External Access via NGINX
location ^~ /$app_baseurl/feed/calendar {
auth_basic off;
proxy_pass http://127.0.0.1:$app_port;
}
ARRNGINX

wasActive=$(systemctl is-active $app_servicefile)
Expand Down
8 changes: 8 additions & 0 deletions scripts/nginx/sonarr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ location ^~ /$app_baseurl/api {
auth_basic off;
proxy_pass http://127.0.0.1:$app_port;
}
# Allow Calendar Feed External Access via NGINX
location ^~ /$app_baseurl/feed/calendar {
auth_basic off;
proxy_pass http://127.0.0.1:$app_port;
}
ARRNGINX

wasActive=$(systemctl is-active $app_servicefile)
Expand Down
8 changes: 4 additions & 4 deletions scripts/update/lidarr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ if [[ -f /install/.lidarr.lock ]]; then
fi

if [[ -f /install/.nginx.lock ]]; then
if grep -q "8686/lidarr" /etc/nginx/apps/lidarr.conf; then
echo_progress_start "Updating nginx for config lidarr"
if grep -q "8686/lidarr" /etc/nginx/apps/lidarr.conf || ! grep -q "calendar" /etc/nginx/apps/lidarr.conf; then
echo_progress_start "Updating nginx for config for lidarr"
bash /etc/swizzin/scripts/nginx/lidarr.sh
systemctl reload nginx
echo_progress_done "nginx updated."
systemctl reload nginx -q
echo_progress_done "nginx conf for lidarr upgraded"
fi
fi
fi
5 changes: 3 additions & 2 deletions scripts/update/radarr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ ${app_name^} updater is exiting, please try again later."
echo_log_only "Radarr's ports are not on 8787"
fi
if [[ -f /install/.nginx.lock ]]; then
if grep -q "7878/radarr" /etc/nginx/apps/radarr.conf; then
# check for /feed/calendar auth bypass
if grep -q "7878/radarr" /etc/nginx/apps/radarr.conf || ! grep -q "calendar" /etc/nginx/apps/radarr.conf; then
echo_progress_start "Upgrading nginx config for Radarr"
bash /etc/swizzin/scripts/nginx/radarr.sh
systemctl reload nginx -q
echo_progress_done "Nginx config for Radarr upgraded"
echo_progress_done "nginx config for Radarr upgraded"
fi
fi
fi
5 changes: 3 additions & 2 deletions scripts/update/readarr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

if [[ -f /install/.readarr.lock ]]; then
if [[ -f /install/.nginx.lock ]]; then
if grep -q "8787/readarr" /etc/nginx/apps/readarr.conf; then
# check for /feed/calendar auth bypass
if grep -q "8787/readarr" "/etc/nginx/apps/readarr.conf" || ! grep -q "calendar" /etc/nginx/apps/readarr.conf; then
echo_progress_start "Upgrading nginx config for Readarr"
bash /etc/swizzin/scripts/nginx/readarr.sh
systemctl reload nginx -q
echo_progress_done "Nginx conf for Readarr upgraded"
echo_progress_done "nginx conf for Readarr upgraded"
fi
fi
fi
14 changes: 8 additions & 6 deletions scripts/update/sonarr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ if [[ -f /install/.sonarr.lock ]]; then
mono_repo_update
systemctl try-restart sonarr

# Update Sonarr nginx config to bakerboy specs
if grep -q "8989/sonarr" /etc/nginx/apps/sonarr.conf; then
echo_progress_start "Upgrading nginx config for Sonarr"
bash /etc/swizzin/scripts/nginx/sonarr.sh
systemctl reload nginx -q
echo_progress_done "Nginx config for Sonarr upgraded"
if [[ -f /install/.nginx.lock ]]; then
# Update Sonarr nginx config to bakerboy specs or to allow feed auth bypass
if grep -q "8989/sonarr" /etc/nginx/apps/sonarr.conf || ! grep -q "calendar" /etc/nginx/apps/sonarr.conf; then
echo_progress_start "Upgrading nginx config for Sonarr"
bash /etc/swizzin/scripts/nginx/sonarr.sh
systemctl reload nginx -q
echo_progress_done "Nginx config for Sonarr upgraded"
fi
fi
fi

Expand Down

0 comments on commit 9dc0c50

Please sign in to comment.