diff --git a/hosts/by-name/servo/services/transmission/torrent-done b/hosts/by-name/servo/services/transmission/torrent-done index 22a1a664d..08b3e5a0c 100755 --- a/hosts/by-name/servo/services/transmission/torrent-done +++ b/hosts/by-name/servo/services/transmission/torrent-done @@ -7,6 +7,7 @@ # optionally: # - TR_DRY_RUN=1 # - TR_DEBUG=1 +# - TR_NO_HARDLINK=1 DOWNLOAD_DIR=/var/media/torrents @@ -65,6 +66,9 @@ destructive find "$MEDIA_DIR/" -type f \(\ -o -iname 'YTS*.com.txt' \ \) -exec rm {} \; -# dedupe the whole media library. -# yeah, a bit excessive: move this to a cron job if that's problematic. -destructive hardlink /var/media --reflink=always --ignore-time --verbose +if ! [ -b "${TR_NO_HARDLINK}" ]; then + # dedupe the whole media library. + # yeah, a bit excessive: move this to a cron job if that's problematic + # or make it run with only 1/N probability, etc. + destructive hardlink /var/media --reflink=always --ignore-time --verbose +fi