Sign in to follow this  
Followers 0
dav3white

Can Run Btc From A Bash Script

1 post in this topic

I'm trying to run

btc list | btc filter --key state "FINISHED" | btc remove

to auto remove any finished torrents.

 

This line is in a bash script that also runs a filebot script, which is run every 5 minutes as a crontab job.

#!/bin/bash
## btc list | btc filter --key state "FINISHED" | btc remove
if [ "$(ls -A /media/Server/tempvideos)" ] 
then
filebot -script "/opt/utorrent-server-v3_0/amc.groovy" --output "/media/Server/Videos" --log-file "amc.log" --def music=y --action move --conflict override -non-strict "/media/Server/tempvideos" --def plex=192.168.1.124  
find /media/Server/Videos/.incoming/ -empty -type d -delete
filebot -script "/opt/utorrent-server-v3_0/cleaner.groovy" /media/Server/tempvideos/
fi
 
If i run the script from the prompt, it works perfectly, but when crontab runs it, the filebot scripts complete but the btc line doesn't remove the finished torrents.
 
Any help would be greatly appreciated.
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0