Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibTorrent/rTorrent not calling script #153

Closed
DigitalJosee opened this issue May 30, 2017 · 2 comments
Closed

LibTorrent/rTorrent not calling script #153

DigitalJosee opened this issue May 30, 2017 · 2 comments

Comments

@DigitalJosee
Copy link

Hello,

I just installed rTorrent/libTorrent on my new box and I'm trying to make it call my script (I'm sure that this script is fine, I use it on my other rTorrent setup and everything works fine). But every time a download complete, I get: Event 'event.download.finished' failed: Bad return code.

I have tried numerous configs and scripts, but my script isn't being called at all (I just put one echo "$1 $2 $3" >> /home/test.txt at the top to test).

Any idea of what is causing this?

My .rtorrent.rc:

# This is the rtorrent configuration file installed by rtinst script - https://github.com/arakasi72/rtinst
# This file is installed to ~/.rtorrent.rc
# Enable/modify the options as needed, uncomment the options you wish to enable.
# This configuration will work well with most systems, but optimal settings are dependant on specific server setup

### Set Directories
method.insert = cfg.basedir,    private|const|string, (cat,"digitaljose/rtorrent/")
method.insert = cfg.watch,      private|const|string, (cat,(cfg.basedir),"watch/")

#method.insert = cfg.logs,       private|const|string, (cat,(cfg.basedir),"log/")
#method.insert = cfg.logfile,    private|const|string, (cat,(c   fg.logs),"rtorrent-",(system.time),".log")

session.path.set = (cat,(cfg.basedir),".session")
directory.default.set = (cat,(cfg.basedir),"download")

schedule = watch_directory,5,5,((load.start,(cat,(cfg.watch),"*.torrent")))

### BitTorrent
# Global upload and download rate in KiB, `0` for unlimited
throttle.global_down.max_rate.set = 0
throttle.global_up.max_rate.set = 0

# Maximum number of simultaneous downloads and uploads slots
throttle.max_downloads.global.set = 150
throttle.max_uploads.global.set = 150

# Maximum and minimum number of peers to connect to per torrent while downloading
throttle.min_peers.normal.set = 30
throttle.max_peers.normal.set = 150

# Same as above but for seeding completed torrents (seeds per torrent)
throttle.min_peers.seed.set = -1
throttle.max_peers.seed.set = -1

### Networking
network.port_range.set = 51001-51250
network.port_random.set = yes
dht.mode.set = disable
protocol.pex.set = no
trackers.use_udp.set = yes

# network.scgi.open_port = localhost:5000
network.scgi.open_port = 127.0.0.1:5000
network.http.ssl_verify_peer.set = 0
protocol.encryption.set = allow_incoming,enable_retry,prefer_plaintext

network.max_open_files.set = 4096
network.max_open_sockets.set = 1536
network.http.max_open.set = 48
network.send_buffer.size.set = 4M
network.receive_buffer.size.set = 4M

### Memory Settings
pieces.hash.on_completion.set = no
pieces.preload.type.set = 1
pieces.memory.max.set = 3500M

### Logging:
#   Levels = critical error warn notice info debug
#   Groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_*
#print = (cat,"Logging to ",(cfg.logfile))
#log.open_file = "log", (cfg.logfile)
#log.add_output = "info", "log"
#log.add_output = "tracker_debug", "log"


### The following line initialises rutorrent plugins without needing to open the web interface
execute = {sh,-c,/usr/bin/php /var/www/rutorrent/php/initplugins.php digitaljose &}

method.set_key = event.download.finished,upload_drive,"execute=/home/rtorrent/torrent.sh,$d.get_custom1=,$d.get_base_path=,$d.get_base_filename= "

#EOF
@DigitalJosee
Copy link
Author

And this is my script, in case you need it:

echo "$1 $2 $3" >> /home/test.txt
rclone copy "$2" gdrive:"Downloads/$1/$3" --transfers=7 &

@DigitalJosee
Copy link
Author

It was a problem on my side.

Issue with permissions and users, already fixed!

Thanks for that amazing product and sorry for this Issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant