Skip to content

Instantly share code, notes, and snippets.

View rostislavzz's full-sized avatar
🕊️

Rostislav Shikhov rostislavzz

🕊️
View GitHub Profile
@rostislavzz
rostislavzz / add-cron-job.sh
Last active June 17, 2022 12:37 — forked from pawelszydlo/transmission_remove_finished.sh
Script to clear completed torrents from Transmission by location and ratio to use with Docker container https://hub.docker.com/r/linuxserver/transmission/. Place "remove-completed-torrent.sh" to "/config", and "add-cron-job.sh" to "/config/custom-cont-init.d".
#!/bin/bash
if [ -z "$(crontab -l | grep 'remove-completed-torrent.sh')" ]; then
crontab -l | { cat; echo "0 3 * * * /config/remove-completed-torrent.sh 2>&1"; } | crontab -
fi