mirror of
https://github.com/linuxserver/docker-transmission.git
synced 2025-11-05 02:55:42 +01:00
18 lines
346 B
Plaintext
18 lines
346 B
Plaintext
#!/usr/bin/with-contenv bash
|
|
|
|
_term() {
|
|
echo "Caught SIGTERM signal!"
|
|
if [ ! -z "$USER" ] && [ ! -z "$PASS" ]; then
|
|
/usr/bin/transmission-remote -n "$USER":"$PASS" --exit
|
|
else
|
|
/usr/bin/transmission-remote --exit
|
|
fi
|
|
}
|
|
|
|
trap _term SIGTERM
|
|
|
|
s6-setuidgid abc /usr/bin/transmission-daemon \
|
|
-g /config -c /watch -f &
|
|
|
|
wait
|