Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ init_diagram: |
"sabnzbd:latest" <- Base Images
# changelog
changelogs:
- {date: "18.08.26:", desc: "Only force the bind address when it is unset or loopback."}
- {date: "04.07.26:", desc: "Rebase to Alpine 3.24"}
- {date: "28.12.25:", desc: "Rebase to Alpine 3.23. Add RISCV build."}
- {date: "05.07.25:", desc: "Rebase to Alpine 3.22."}
Expand Down
19 changes: 19 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-sabnzbd/run
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@

FAMILY=::

# Respect a host the user already configured in the [misc] section of
# sabnzbd.ini, unless it is unset or a loopback address. Passing that same
# value back through --server is a no-op, so this cannot lock anyone out of
# the web UI, which is the reason --server is here at all.
#
# Section tracking, because the NNTP server entries under [servers] carry
# their own unindented `host = ...` line.
CONFIGURED_HOST=$(awk '/^\[/{s=$0} s=="[misc]" && /^host[[:space:]]*=/{sub(/^host[[:space:]]*=[[:space:]]*/,""); print; exit}' /config/sabnzbd.ini 2>/dev/null)

if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
if ! test -f /proc/net/if_inet6; then
FAMILY=0.0.0.0
Expand All @@ -11,11 +20,21 @@ if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
rm /etc/hosts.new
fi

case ${CONFIGURED_HOST} in
"" | 127.0.0.1 | ::1 | localhost) ;;
*) FAMILY=${CONFIGURED_HOST} ;;
esac

exec \
s6-notifyoncheck -d -n 300 -w 1000 \
s6-setuidgid abc python3 /app/sabnzbd/SABnzbd.py \
--config-file /config --server "$FAMILY"
else
case ${CONFIGURED_HOST} in
"" | 127.0.0.1 | ::1 | localhost) ;;
*) FAMILY=${CONFIGURED_HOST} ;;
esac

exec \
s6-notifyoncheck -d -n 300 -w 1000 \
python3 /app/sabnzbd/SABnzbd.py \
Expand Down
Loading