Skip to content

Commit 42c1fa9

Browse files
fix systemd service
1 parent a985937 commit 42c1fa9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tracker-add-auto.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sleep 3m
2323
rm /tmp/TTAA.$id.lock
2424
}
2525
# Get list of active torrents
26-
ids="$(transmission-remote --auth="$auth" --list | grep -E 'Downloading' | grep '^ ' | awk '{ print $1 }')"
26+
ids="$(transmission-remote --auth="$auth" --list | grep -vE 'Seeding|Stopped|Finished' | grep '^ ' | awk '{ print $1 }')"
2727
for id in $ids ; do
2828
add_date="$(transmission-remote --auth="$auth" --torrent "$id" --info| grep '^ Date added: ' |cut -c 21-)"
2929
add_date_t="$(date -d "$add_date" "+%Y-%m-%d %H:%M")"

transmission-tracker-add.service

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ Description=transmission tracker add
33
Requires=network.target
44

55
[Service]
6-
Type=forked
6+
Type=simple
77
ExecStart=/opt/bin/add_trackers_auto.sh
8-
Restart=always
8+
ExecStop=/bin/kill -s TERM $MAINPID
9+
KillMode=control-group
910

1011
[Install]
1112
WantedBy=multi-user.target

0 commit comments

Comments
 (0)