Skip to content

Commit bfa6974

Browse files
committed
swag: auto-configure reverse proxy for software modules + SWAG-aware menu URLs
Wires SWAG into the configng software stack so that installing any of the supported modules on a host running SWAG also enables the matching nginx proxy-conf, and the menu UI shows the SWAG subfolder URL instead of the direct host:port whenever the proxy is live. Core helpers (module_docker_utils.sh, runtime/config.runtime.sh, module_env_init.sh): - SWAG_URL is read from ${SOFTWARE_FOLDER}/swag/config/SWAG_URL at env init and exposed to all modules. DISPLAY_URL=${SWAG_URL:-$LOCALIPADD} is the single source of truth for the menu's right column. - get_service_url <service> <port>: returns https://$DISPLAY_URL/<service> when SWAG is up and the proxy-conf for <service> is enabled, http://$DISPLAY_URL:<port> otherwise. - docker_configure_swag_proxy <service> [port] [proto]: copies the SWAG sample to its enabled .conf, sed-rewrites $upstream_port and $upstream_proto, touches the .enabled marker, and reloads nginx. Silent no-op (returns 1) if the sample isn't present, returns 2 if SWAG isn't installed — modules can call it unconditionally. - docker_seed_swag_proxy_conf <service>: reads an nginx subfolder proxy-conf from stdin and writes it as /config/nginx/proxy-confs/<service>.subfolder.conf.sample inside the SWAG container, for services where linuxserver/reverse-proxy- confs:master doesn't ship a stock sample (currently netbox; same pattern applicable to immich, vaultwarden, …). Skips writing if a sample is already present so an upstream sample or hand-edited admin override wins on the next install. Per-module wiring: - 22 modules whose dockername matches a stock proxy-conf in linuxserver/reverse-proxy-confs:master gain a docker_configure_swag_proxy call after their docker run: bazarr, deluge, domoticz, dozzle, duplicati, embyserver→emby, filebrowser, ghost, grafana, jellyfin, lidarr, medusa, netdata, nextcloud (https), phpmyadmin, pi-hole→pihole, prowlarr, qbittorrent, radarr, sabnzbd, sonarr, syncthing, transmission. - homepage / immich / netbox / portainer pre-existing custom paths are folded in, with portainer correctly using HTTPS+9443. netbox SWAG support (subfolder mode): - Seeds a hand-authored netbox.subfolder.conf.sample into SWAG via docker_seed_swag_proxy_conf so docker_configure_swag_proxy has something to enable. The conf does not rewrite the path — upstream NetBox sees /netbox unchanged. - When the swag container is present at install time, bakes BASE_PATH = 'netbox/' and CSRF_TRUSTED_ORIGINS = ['https://$SWAG_URL'] into the generated configuration.py. Without BASE_PATH, Django emits absolute URLs (form action=/login/?next=/netbox, /static/…) that 404 once SWAG strips them at /netbox; without CSRF_TRUSTED_ORIGINS, login POSTs 403 even with paths fixed. These settings live in configuration.py because netboxcommunity/ netbox does not consume BASE_PATH= / CSRF_TRUSTED_ORIGINS= from the container env. Trade-off: with BASE_PATH set, direct port access at / no longer works — only http://host:port/netbox/. netbox postgres args: - module_postgres install takes six positional args (<user> <pass> <db> <image-repo> <image-tag> <container-name>); netbox was passing five and fusing image+tag into one. The result was Docker 404'ing on 'postgres:17-alpine:postgres-netbox' and the postgres container defaulting to the name 'postgres' (collision with any standalone postgres install). Split DATABASE_IMAGE into DATABASE_IMAGE + DATABASE_TAG and pass DATABASE_HOST in its proper sixth slot, matching the pattern module_immich already uses. Menu URL routing (config.runtime.sh): - 23 update_sub_submenu_data lines (the SWAG-applicable subset) now go through get_service_url — flipping each menu's right-column URL from 'http://host:port' to 'https://host/<service>' the moment that service's proxy-conf is enabled in SWAG, and back if it ever isn't. pi-hole and ghost retain their /admin and /ghost subpaths by appending the suffix after the helper output. - NCT002 (nextcloud) and CPT002 (cockpit) intentionally untouched — direct URLs are HTTPS-only on a self-signed port; helper falls back to plain http otherwise. Worth a follow-up that gives the helper a fallback-protocol arg. No regression for users without SWAG: get_service_url, docker_configure_swag_proxy and docker_seed_swag_proxy_conf all fall back to existing behaviour when the swag container isn't present.
1 parent ec83e60 commit bfa6974

38 files changed

Lines changed: 805 additions & 117 deletions

tools/modules/functions/module_docker_utils.sh

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ docker_operation_progress() {
142142
# Ensure Docker is available
143143
docker_ensure_docker
144144

145+
# Ensure unbuffer is available (for real-time pull progress)
146+
if ! command -v unbuffer >/dev/null 2>&1; then
147+
pkg_install expect
148+
fi
149+
145150
# Argument validation
146151
if [[ -z "$operation" || -z "$target" ]]; then
147152
dialog_msgbox "Usage Error" "Usage: docker_operation_progress <pull|rm|rmi> <target>\n\n pull <image> - Pull Docker image\n rm <container> - Remove container\n rmi <image> - Remove image" 12 60
@@ -467,3 +472,118 @@ docker_operation_progress() {
467472

468473
return 0
469474
}
475+
476+
#
477+
# Configure SWAG reverse proxy for a service
478+
# Usage: docker_configure_swag_proxy <servicename> [port] [protocol] [upstream_host]
479+
#
480+
# Parameters:
481+
# servicename - Name of the service (e.g., "transmission", "sonarr")
482+
# port - Optional: Override the default port in the proxy config
483+
# protocol - Optional: Override the protocol (http/https) in the proxy config
484+
# upstream_host - Optional: Override 'set $upstream_app …' in the proxy
485+
# config. Stock LSIO samples assume the service is on the
486+
# 'lsio' bridge and resolve by container name; modules
487+
# that run with '--network=host' can't be addressed that
488+
# way, so we point at the host's IP (or any IP the SWAG
489+
# container can route to) here. Pass $LOCALIPADD or similar.
490+
#
491+
# Returns: 0 on success, 1 if proxy config not found or enabling failed
492+
#
493+
docker_configure_swag_proxy() {
494+
local servicename="$1"
495+
local port="$2"
496+
local protocol="$3"
497+
local upstream_host="$4"
498+
499+
# Check if SWAG container exists
500+
if ! docker container ls -a --format "{{.Names}}" | grep -q "^swag$"; then
501+
return 2
502+
fi
503+
504+
# Check if SWAG has proxy config for this service (sample or actual)
505+
local proxy_sample="/config/nginx/proxy-confs/${servicename}.subfolder.conf.sample"
506+
local proxy_actual="/config/nginx/proxy-confs/${servicename}.subfolder.conf"
507+
508+
if docker exec swag test -f "$proxy_sample" 2>/dev/null; then
509+
# Copy sample to actual config if it doesn't exist
510+
if ! docker exec swag test -f "$proxy_actual" 2>/dev/null; then
511+
docker exec swag cp "$proxy_sample" "$proxy_actual" 2>/dev/null
512+
fi
513+
514+
# If port is specified, update it in the config
515+
if [[ -n "$port" ]]; then
516+
docker exec swag sed -i "s/set \\\$upstream_port [0-9]*/set \\\$upstream_port ${port}/g" "$proxy_actual" 2>/dev/null
517+
fi
518+
519+
# If protocol is specified, update it in the config
520+
if [[ -n "$protocol" ]]; then
521+
docker exec swag sed -i "s/set \\\$upstream_proto [a-z]*/set \\\$upstream_proto ${protocol}/g" "$proxy_actual" 2>/dev/null
522+
fi
523+
524+
# If upstream_host is specified, replace the LSIO bridge name
525+
# in 'set $upstream_app …'. Required for --network=host
526+
# services since the docker DNS can't resolve the container
527+
# name from inside SWAG's lsio namespace.
528+
if [[ -n "$upstream_host" ]]; then
529+
docker exec swag sed -i "s|set \\\$upstream_app [^;]*|set \\\$upstream_app ${upstream_host}|g" "$proxy_actual" 2>/dev/null
530+
fi
531+
532+
# Enable the proxy configuration
533+
if docker exec swag touch "/config/nginx/proxy-confs/${servicename}.subfolder.conf.enabled" 2>/dev/null; then
534+
# Reload nginx to apply
535+
docker exec swag nginx -s reload >/dev/null 2>&1
536+
return 0
537+
fi
538+
return 1
539+
fi
540+
541+
return 1
542+
}
543+
544+
#
545+
# Seed a custom SWAG subfolder proxy-conf sample inside the SWAG container.
546+
# Usage: docker_seed_swag_proxy_conf <servicename> <<'NGINX'
547+
# location ^~ /<servicename> { … }
548+
# NGINX
549+
#
550+
# Used for services that linuxserver/reverse-proxy-confs:master does NOT
551+
# ship a stock sample for (e.g. netbox, immich). Reads the conf body from
552+
# stdin and writes it to:
553+
# /config/nginx/proxy-confs/<servicename>.subfolder.conf.sample
554+
# inside the SWAG container, where docker_configure_swag_proxy() picks
555+
# it up on its next call.
556+
#
557+
# Behaviour:
558+
# - If the SWAG container isn't installed, returns 2 (no-op).
559+
# - If a `.sample` is already present (whether stock LSIO or seeded by
560+
# a prior call), returns 0 without overwriting — defer to upstream
561+
# when it eventually ships one, and keep an admin's hand-edited
562+
# sample intact across re-installs.
563+
# - Otherwise writes the body and returns 0 on success, 1 on docker
564+
# exec failure.
565+
#
566+
# Returns: 0 on success / no-op skip, 1 on failure, 2 if no SWAG.
567+
#
568+
docker_seed_swag_proxy_conf() {
569+
local servicename="$1"
570+
571+
if ! docker container ls -a --format "{{.Names}}" | grep -q "^swag$"; then
572+
return 2
573+
fi
574+
575+
local proxy_sample="/config/nginx/proxy-confs/${servicename}.subfolder.conf.sample"
576+
577+
# Already there — let it be (LSIO upstream may have started shipping
578+
# one between releases; the admin may have hand-edited it).
579+
if docker exec swag test -f "$proxy_sample" 2>/dev/null; then
580+
return 0
581+
fi
582+
583+
# `docker exec -i ... sh -c "cat > FILE"` is the portable way to
584+
# stream stdin into a file inside the container.
585+
if docker exec -i swag sh -c "cat > '${proxy_sample}'" 2>/dev/null; then
586+
return 0
587+
fi
588+
return 1
589+
}

tools/modules/functions/module_env_init.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ function set_runtime_variables() {
141141
LOCALIPADD=$(ip -4 addr show dev $DEFAULT_ADAPTER | awk '/inet/ {print $2}' | cut -d'/' -f1)
142142
LOCALSUBNET=$(echo ${LOCALIPADD} | cut -d"." -f1-3).0/24
143143

144+
# Check if SWAG is installed and use its domain URL for display
145+
# This replaces LOCALIPADD with the actual domain in menu URLs
146+
SWAG_URL=""
147+
if [[ -f "${SOFTWARE_FOLDER}/swag/config/SWAG_URL" ]]; then
148+
SWAG_URL=$(cat "${SOFTWARE_FOLDER}/swag/config/SWAG_URL")
149+
fi
150+
144151
# create local lan and docker lan whitelist for transmission
145152
TRANSMISSION_WHITELIST=$(echo ${LOCALIPADD} | cut -d"." -f1-3)".*"
146153
local docker_subnet=$(docker network inspect lsio 2> /dev/null | grep Subnet | xargs | cut -d" " -f2 | cut -d"/" -f1 | cut -d"." -f1-2)

tools/modules/runtime/config.runtime.sh

Lines changed: 74 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,41 @@ locale_setting="$LANG"
1616
installed_software="$(see_current_apt)"
1717
held_packages=$(apt-mark showhold)
1818

19+
# Use SWAG domain URL if available, otherwise fall back to local IP
20+
# This makes all menu URLs show the actual domain instead of IP when SWAG is installed
21+
DISPLAY_URL="${SWAG_URL:-$LOCALIPADD}"
22+
23+
# Helper function to determine service URL format.
24+
# - SWAG container missing OR proxy-conf for this service not
25+
# enabled → http://$LOCALIPADD:<port>. The non-proxied backend
26+
# listens on the host's LAN IP, NOT on the public SWAG domain
27+
# (which only serves SWAG itself on 443) — DISPLAY_URL would be
28+
# the wrong host here when SWAG_URL is set.
29+
# - Proxy-conf enabled → https://$DISPLAY_URL/<service>. DISPLAY_URL
30+
# resolves to SWAG_URL whenever it's set, which is exactly the
31+
# public domain we want for the SWAG-fronted path.
32+
get_service_url() {
33+
local service_name="$1"
34+
local service_port="$2"
35+
36+
# Check if SWAG is running
37+
if ! docker container ls -a --format "{{.Names}}" 2>/dev/null | grep -q "^swag$"; then
38+
echo "http://$LOCALIPADD:$service_port"
39+
return
40+
fi
41+
42+
# Check if SWAG proxy is enabled for this service
43+
local proxy_enabled_file="/config/nginx/proxy-confs/${service_name}.subfolder.conf.enabled"
44+
if ! docker exec swag test -f "$proxy_enabled_file" 2>/dev/null; then
45+
echo "http://$LOCALIPADD:$service_port"
46+
return
47+
fi
48+
49+
# SWAG proxy is enabled - return subfolder URL
50+
echo "https://$DISPLAY_URL/$service_name"
51+
}
52+
53+
1954
module_options+=(
2055
["update_json_data,author"]="@Tearran"
2156
["update_json_data,ref_link"]=""
@@ -103,72 +138,80 @@ update_sub_submenu_data "System" "Storage" "NFS04" "$NFS_CLIENTS_NUMBER"
103138

104139
# Database
105140
update_sub_submenu_data "Software" "Database" "DAT002" "Server: $LOCALIPADD"
106-
update_sub_submenu_data "Software" "Database" "MYA002" "http://$LOCALIPADD:${module_options["module_phpmyadmin,port"]}"
141+
update_sub_submenu_data "Software" "Database" "MYA002" "$(get_service_url "phpmyadmin" "${module_options["module_phpmyadmin,port"]}")"
107142

108143
# Finance
109144
update_sub_submenu_data "Software" "Finance" "ABU002" "http://$LOCALIPADD:${module_options["module_actualbudget,port"]}"
110145
update_sub_submenu_data "Software" "Finance" "WAL002" "http://$LOCALIPADD:${module_options["module_wallos,port"]}"
111146

112147
# Media
113148
update_sub_submenu_data "Software" "Media" "OMV002" "http://$LOCALIPADD:${module_options["module_omv,port"]}"
114-
update_sub_submenu_data "Software" "Media" "MED002" "http://$LOCALIPADD:${module_options["module_plexmediaserver,port"]}"
115-
update_sub_submenu_data "Software" "Media" "EMB002" "http://$LOCALIPADD:${module_options["module_embyserver,port"]}"
116-
update_sub_submenu_data "Software" "Media" "FIL002" "http://$LOCALIPADD:${module_options["module_filebrowser,port"]}"
149+
update_sub_submenu_data "Software" "Media" "MED002" "$(get_service_url "plex" "${module_options["module_plexmediaserver,port"]}")"
150+
update_sub_submenu_data "Software" "Media" "EMB002" "$(get_service_url "emby" "${module_options["module_embyserver,port"]}")"
151+
update_sub_submenu_data "Software" "Media" "FIL002" "$(get_service_url "filebrowser" "${module_options["module_filebrowser,port"]}")"
117152
update_sub_submenu_data "Software" "Media" "STR002" "http://$LOCALIPADD:${module_options["module_stirling,port"]}"
118-
update_sub_submenu_data "Software" "Media" "STC002" "http://$LOCALIPADD:${module_options["module_syncthing,port"]%% *}" # removing second port from url
153+
update_sub_submenu_data "Software" "Media" "STC002" "$(get_service_url "syncthing" "${module_options["module_syncthing,port"]%% *}")" # removing second port from url
119154
update_sub_submenu_data "Software" "Media" "NCT002" "https://$LOCALIPADD:${module_options["module_nextcloud,port"]}"
120155
update_sub_submenu_data "Software" "Media" "OWC002" "http://$LOCALIPADD:${module_options["module_owncloud,port"]}"
121-
update_sub_submenu_data "Software" "Media" "JMS002" "http://$LOCALIPADD:${module_options["module_jellyfin,port"]}"
122-
update_sub_submenu_data "Software" "Media" "IMM002" "http://$LOCALIPADD:${module_options["module_immich,port"]}"
156+
update_sub_submenu_data "Software" "Media" "JMS002" "$(get_service_url "jellyfin" "${module_options["module_jellyfin,port"]}")"
157+
update_sub_submenu_data "Software" "Media" "IMM002" "$(get_service_url "immich" "${module_options["module_immich,port"]}")"
123158
update_sub_submenu_data "Software" "Media" "NAV002" "http://$LOCALIPADD:${module_options["module_navidrome,port"]}"
124159

125160
# Containers
126-
update_sub_submenu_data "Software" "Containers" "POR002" "http://$LOCALIPADD:${module_options["module_portainer,port"]%% *}" # removing second port from url
161+
# Portainer uses HTTPS on port 9443 (not the edge agent port 9000)
162+
if docker container ls -a --format "{{.Names}}" 2>/dev/null | grep -q "^swag$" && \
163+
docker exec swag test -f "/config/nginx/proxy-confs/portainer.subfolder.conf.enabled" 2>/dev/null; then
164+
update_sub_submenu_data "Software" "Containers" "POR002" "https://$DISPLAY_URL/portainer"
165+
else
166+
update_sub_submenu_data "Software" "Containers" "POR002" "https://$LOCALIPADD:9443"
167+
fi
127168

128169
# Backup
129-
update_sub_submenu_data "Software" "Backup" "DPL002" "http://$LOCALIPADD:${module_options["module_duplicati,port"]%% *}" # removing second port from url
170+
update_sub_submenu_data "Software" "Backup" "DPL002" "$(get_service_url "duplicati" "${module_options["module_duplicati,port"]%% *}")" # removing second port from url
130171

131172
# Printing
132-
update_sub_submenu_data "Software" "Printing" "OCT002" "http://$LOCALIPADD:${module_options["module_octoprint,port"]}"
173+
update_sub_submenu_data "Software" "Printing" "OCT002" "$(get_service_url "octoprint" "${module_options["module_octoprint,port"]}")"
133174

134175
# DevTools
135176
[[ -f /etc/rsyncd.conf ]] && update_sub_submenu_data "Software" "DevTools" "DEV011" "$(grep -oP '(?<=^\[).*(?=\])' /etc/rsyncd.conf | xargs)"
136177

137178
# Home automation
138179
update_sub_submenu_data "Software" "HomeAutomation" "HAB002" "http://$LOCALIPADD:${module_options["module_openhab,port"]}"
139180
update_sub_submenu_data "Software" "HomeAutomation" "HAS002" "http://$LOCALIPADD:${module_options["module_haos,port"]}"
140-
update_sub_submenu_data "Software" "HomeAutomation" "DOM002" "http://$LOCALIPADD:${module_options["module_domoticz,port"]}"
181+
update_sub_submenu_data "Software" "HomeAutomation" "DOM002" "$(get_service_url "domoticz" "${module_options["module_domoticz,port"]}")"
141182
update_sub_submenu_data "Software" "HomeAutomation" "EVCC02" "http://$LOCALIPADD:${module_options["module_evcc,port"]}"
142183

143184
# DNS
144-
update_sub_submenu_data "Software" "DNS" "PIH003" "http://$LOCALIPADD:${module_options["module_pi_hole,port"]%% *}/admin" # removing second port from url
185+
update_sub_submenu_data "Software" "DNS" "PIH003" "$(get_service_url "pihole" "${module_options["module_pi_hole,port"]%% *}")/admin" # removing second port from url
145186
update_sub_submenu_data "Software" "DNS" "ADG002" "http://$LOCALIPADD:${module_options["module_adguardhome,port"]%% *}" # removing second port from url
146187

147188
# Monitoring
148-
update_sub_submenu_data "Software" "Monitoring" "UPK002" "http://$LOCALIPADD:${module_options["module_uptimekuma,port"]}"
149-
update_sub_submenu_data "Software" "Monitoring" "NTD002" "http://$LOCALIPADD:${module_options["module_netdata,port"]}"
150-
update_sub_submenu_data "Software" "Monitoring" "GRA002" "http://$LOCALIPADD:${module_options["module_grafana,port"]}"
151-
update_sub_submenu_data "Software" "Monitoring" "NAX002" "http://$LOCALIPADD:${module_options["module_netalertx,port"]}"
152-
update_sub_submenu_data "Software" "Monitoring" "PRO002" "http://$LOCALIPADD:${module_options["module_prometheus,port"]}"
189+
update_sub_submenu_data "Software" "Monitoring" "UPK002" "$(get_service_url "uptime-kuma" "${module_options["module_uptimekuma,port"]}")"
190+
update_sub_submenu_data "Software" "Monitoring" "NTD002" "$(get_service_url "netdata" "${module_options["module_netdata,port"]}")"
191+
update_sub_submenu_data "Software" "Monitoring" "GRA002" "$(get_service_url "grafana" "${module_options["module_grafana,port"]}")"
192+
update_sub_submenu_data "Software" "Monitoring" "NAX002" "$(get_service_url "netalertx" "${module_options["module_netalertx,port"]}")"
193+
update_sub_submenu_data "Software" "Monitoring" "PRO002" "$(get_service_url "prometheus" "${module_options["module_prometheus,port"]}")"
194+
update_sub_submenu_data "Software" "Monitoring" "DOZ002" "$(get_service_url "dozzle" "${module_options["module_dozzle,port"]}")"
153195

154196
# Management
155197
update_sub_submenu_data "Software" "Management" "CPT002" "https://$LOCALIPADD:${module_options["module_cockpit,port"]}"
156-
update_sub_submenu_data "Software" "Management" "HPG002" "http://$LOCALIPADD:${module_options["module_homepage,port"]}"
157-
update_sub_submenu_data "Software" "Management" "NBOX02" "http://$LOCALIPADD:${module_options["module_netbox,port"]}"
198+
update_sub_submenu_data "Software" "Management" "HPG002" "$(get_service_url "homepage" "${module_options["module_homepage,port"]}")"
199+
update_sub_submenu_data "Software" "Management" "NBOX02" "$(get_service_url "netbox" "${module_options["module_netbox,port"]}")"
158200

159201
# Downloaders
160-
update_sub_submenu_data "Software" "Downloaders" "DOW002" "http://$LOCALIPADD:${module_options["module_qbittorrent,port"]%% *}" # removing second port from url
161-
update_sub_submenu_data "Software" "Downloaders" "DEL002" "http://$LOCALIPADD:${module_options["module_deluge,port"]%% *}" # removing second port from url
162-
update_sub_submenu_data "Software" "Downloaders" "TRA002" "http://$LOCALIPADD:${module_options["module_transmission,port"]%% *}" # removing second port from url
163-
update_sub_submenu_data "Software" "Downloaders" "SABN02" "http://$LOCALIPADD:${module_options["module_sabnzbd,port"]}"
164-
update_sub_submenu_data "Software" "Downloaders" "MDS002" "http://$LOCALIPADD:${module_options["module_medusa,port"]}"
165-
update_sub_submenu_data "Software" "Downloaders" "SON002" "http://$LOCALIPADD:${module_options["module_sonarr,port"]}"
166-
update_sub_submenu_data "Software" "Downloaders" "RAD002" "http://$LOCALIPADD:${module_options["module_radarr,port"]}"
167-
update_sub_submenu_data "Software" "Downloaders" "BAZ002" "http://$LOCALIPADD:${module_options["module_bazarr,port"]}"
168-
update_sub_submenu_data "Software" "Downloaders" "LID002" "http://$LOCALIPADD:${module_options["module_lidarr,port"]}"
169-
update_sub_submenu_data "Software" "Downloaders" "RDR002" "http://$LOCALIPADD:${module_options["module_readarr,port"]}"
170-
update_sub_submenu_data "Software" "Downloaders" "DOW026" "http://$LOCALIPADD:${module_options["module_prowlarr,port"]}"
202+
update_sub_submenu_data "Software" "Downloaders" "DOW002" "$(get_service_url "qbittorrent" "${module_options["module_qbittorrent,port"]%% *}")" # removing second port from url
203+
update_sub_submenu_data "Software" "Downloaders" "DEL002" "$(get_service_url "deluge" "${module_options["module_deluge,port"]%% *}")" # removing second port from url
204+
update_sub_submenu_data "Software" "Downloaders" "TRA002" "$(get_service_url ${module_options["module_transmission,servicename"]} ${module_options["module_transmission,port"]})" # removing second port from url
205+
update_sub_submenu_data "Software" "Downloaders" "SABN02" "$(get_service_url "sabnzbd" "${module_options["module_sabnzbd,port"]}")"
206+
update_sub_submenu_data "Software" "Downloaders" "MDS002" "$(get_service_url "medusa" "${module_options["module_medusa,port"]}")"
207+
update_sub_submenu_data "Software" "Downloaders" "SON002" "$(get_service_url "sonarr" "${module_options["module_sonarr,port"]}")"
208+
update_sub_submenu_data "Software" "Downloaders" "RAD002" "$(get_service_url "radarr" "${module_options["module_radarr,port"]}")"
209+
update_sub_submenu_data "Software" "Downloaders" "BAZ002" "$(get_service_url "bazarr" "${module_options["module_bazarr,port"]}")"
210+
update_sub_submenu_data "Software" "Downloaders" "LID002" "$(get_service_url "lidarr" "${module_options["module_lidarr,port"]}")"
211+
update_sub_submenu_data "Software" "Downloaders" "RDR002" "$(get_service_url "readarr" "${module_options["module_readarr,port"]}")"
212+
update_sub_submenu_data "Software" "Downloaders" "DOW026" "$(get_service_url "prowlarr" "${module_options["module_prowlarr,port"]}")"
171213
update_sub_submenu_data "Software" "Downloaders" "JEL002" "http://$LOCALIPADD:${module_options["module_jellyseerr,port"]}"
172214

173215
# web
174-
update_sub_submenu_data "Software" "WebHosting" "GHOST2" "http://$LOCALIPADD:${module_options["module_ghost,port"]}/ghost"
216+
update_sub_submenu_data "Software" "WebHosting" "GHOST2" "$(get_service_url "ghost" "${module_options["module_ghost,port"]}")/ghost"
217+
update_sub_submenu_data "Software" "WebHosting" "SWAG01" "https://$DISPLAY_URL"

tools/modules/software/module_bazarr.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module_options+=(
99
["module_bazarr,group"]="Downloaders"
1010
["module_bazarr,port"]="6767"
1111
["module_bazarr,arch"]="x86-64 arm64"
12-
["module_bazarr,dockerimage"]="lscr.io/linuxserver/bazarr:latest"
12+
["module_bazarr,dockerimage"]="linuxserver/bazarr:latest"
1313
["module_bazarr,dockername"]="bazarr"
1414
)
1515
#
@@ -47,6 +47,8 @@ function module_bazarr () {
4747
-v "${base_dir}/tv:/tv" \
4848
--restart=always \
4949
"$dockerimage"
50+
# Auto-configure SWAG reverse proxy if available
51+
docker_configure_swag_proxy "$dockername" "6767"
5052
;;
5153
"${commands[1]}") # remove
5254
# Remove container and image (functions handle existence checks)

tools/modules/software/module_code-server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module_options+=(
99
["module_code-server,group"]="Development"
1010
["module_code-server,port"]="8443"
1111
["module_code-server,arch"]="x86-64 arm64"
12-
["module_code-server,dockerimage"]="lscr.io/linuxserver/code-server:latest"
12+
["module_code-server,dockerimage"]="linuxserver/code-server:latest"
1313
["module_code-server,dockername"]="code-server"
1414
)
1515
#

tools/modules/software/module_deluge.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module_options+=(
99
["module_deluge,group"]="Downloaders"
1010
["module_deluge,port"]="8112"
1111
["module_deluge,arch"]="x86-64 arm64"
12-
["module_deluge,dockerimage"]="lscr.io/linuxserver/deluge:latest"
12+
["module_deluge,dockerimage"]="linuxserver/deluge:latest"
1313
["module_deluge,dockername"]="deluge"
1414
)
1515
#
@@ -50,6 +50,8 @@ function module_deluge () {
5050
-v "${base_dir}/downloads:/downloads" \
5151
--restart=always \
5252
"$dockerimage"
53+
# Auto-configure SWAG reverse proxy if available
54+
docker_configure_swag_proxy "$dockername" "8112"
5355
;;
5456
"${commands[1]}") # remove
5557
# Remove container and image (functions handle existence checks)

0 commit comments

Comments
 (0)