Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Added Cronjob support while checking if transmission is running or not
  • Loading branch information
mehulboricha committed Apr 12, 2024
commit fb41bf0c1b78f25e7daf508f561bb23796dfb123
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,8 @@ Usage:
* Adjust other parameters if needed (see comments)
* Make the script run by cron e.g. every minute
* You're done

Cron Setup:
* Open Crontab using crontab -e
* For Updating Trackers to Every New Torrent Every 15 Minutes Add: */15 * * * * /usr/bin/sh [path]]/transmission-trackers-auto-cron.sh
* Modify the transmission-trackers-auto.sh file as per your needs. We have provided two options, transmission-daemon & docker
13 changes: 13 additions & 0 deletions transmission-trackers-auto-cron.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# If you are using transmission-daemon directly on system the below code will ensure that trackers script run only when it is running
if [ "$(systemctl is-active transmission-daemon)" = "active" ]
then
/usr/bin/python3 [path]]/transmission-trackers.py
fi

# If you are using docker for transmission use the following. Replace 'docker-container-name' with the appropriate name
if [ "$( docker container inspect -f '{{.State.Running}}' 'docker-container-name' )" = "true" ]
then
/usr/bin/python3 [path]]/transmission-trackers.py
fi