fix systemd service
This commit is contained in:
parent
a9859371f6
commit
42c1fa9da5
2 changed files with 4 additions and 3 deletions
|
@ -23,7 +23,7 @@ sleep 3m
|
||||||
rm /tmp/TTAA.$id.lock
|
rm /tmp/TTAA.$id.lock
|
||||||
}
|
}
|
||||||
# Get list of active torrents
|
# Get list of active torrents
|
||||||
ids="$(transmission-remote --auth="$auth" --list | grep -E 'Downloading' | grep '^ ' | awk '{ print $1 }')"
|
ids="$(transmission-remote --auth="$auth" --list | grep -vE 'Seeding|Stopped|Finished' | grep '^ ' | awk '{ print $1 }')"
|
||||||
for id in $ids ; do
|
for id in $ids ; do
|
||||||
add_date="$(transmission-remote --auth="$auth" --torrent "$id" --info| grep '^ Date added: ' |cut -c 21-)"
|
add_date="$(transmission-remote --auth="$auth" --torrent "$id" --info| grep '^ Date added: ' |cut -c 21-)"
|
||||||
add_date_t="$(date -d "$add_date" "+%Y-%m-%d %H:%M")"
|
add_date_t="$(date -d "$add_date" "+%Y-%m-%d %H:%M")"
|
||||||
|
|
|
@ -3,9 +3,10 @@ Description=transmission tracker add
|
||||||
Requires=network.target
|
Requires=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forked
|
Type=simple
|
||||||
ExecStart=/opt/bin/add_trackers_auto.sh
|
ExecStart=/opt/bin/add_trackers_auto.sh
|
||||||
Restart=always
|
ExecStop=/bin/kill -s TERM $MAINPID
|
||||||
|
KillMode=control-group
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
Loading…
Add table
Reference in a new issue