Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- sleep 1800
- torrentid=$1
- torrentname=$2
- torrentpath=$3
- downloaddir=$(echo $torrentpath | awk -F '/' '{print $6}')
- tmpdir=$(mktemp -d)
- deluge_state_dir=/home/USER/.config/deluge/state
- rtorrent_watch_dir=/home/USER/downloads/torrents/${downloaddir}
- function on_exit() {
- rm -rf "${tmpdir}"
- }
- cp ${deluge_state_dir}/${torrentid}.torrent ${tmpdir}
- /usr/bin/deluge-console "connect localhost:PORT; rm ${torrentid}"
- sleep 15
- cp ${tmpdir}/${torrentid}.torrent ${rtorrent_watch_dir}
- rm -rf $tmpdir
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement