Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -79,6 +79,7 @@ app_setup_block: |
# changelog
changelogs:

- { date: "09.07.21:", desc: "Wait for the transmission-daemon termination after a caught sigterm" }
- { date: "06.03.21:", desc: "Add Flood for Transmission as a UI option" }
- { date: "23.01.21:", desc: "Rebasing to alpine 3.13." }
- { date: "02.11.20:", desc: "Add ca-certificates package to allow connecting to https trackers." }
Expand Down
4 changes: 4 additions & 0 deletions root/etc/services.d/transmission/run
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

_term() {
echo "Caught SIGTERM signal!"
echo "Tell the transmission session to shut down."
pid=$(pidof transmission-daemon)
if [ ! -z "$USER" ] && [ ! -z "$PASS" ]; then
/usr/bin/transmission-remote -n "$USER":"$PASS" --exit
else
/usr/bin/transmission-remote --exit
fi
# terminate when the transmission-daemon process dies
tail --pid=${pid} -f /dev/null
}

trap _term SIGTERM
Expand Down