Skip to content

Commit fb41bf0

Browse files
committed
Added Cronjob support while checking if transmission is running or not
1 parent 4873f4e commit fb41bf0

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ Usage:
2828
* Adjust other parameters if needed (see comments)
2929
* Make the script run by cron e.g. every minute
3030
* You're done
31+
32+
Cron Setup:
33+
* Open Crontab using crontab -e
34+
* For Updating Trackers to Every New Torrent Every 15 Minutes Add: */15 * * * * /usr/bin/sh [path]]/transmission-trackers-auto-cron.sh
35+
* Modify the transmission-trackers-auto.sh file as per your needs. We have provided two options, transmission-daemon & docker

transmission-trackers-auto-cron.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# If you are using transmission-daemon directly on system the below code will ensure that trackers script run only when it is running
4+
if [ "$(systemctl is-active transmission-daemon)" = "active" ]
5+
then
6+
/usr/bin/python3 [path]]/transmission-trackers.py
7+
fi
8+
9+
# If you are using docker for transmission use the following. Replace 'docker-container-name' with the appropriate name
10+
if [ "$( docker container inspect -f '{{.State.Running}}' 'docker-container-name' )" = "true" ]
11+
then
12+
/usr/bin/python3 [path]]/transmission-trackers.py
13+
fi

0 commit comments

Comments
 (0)