Du Torrent en remote avec Flood

En cours…

Installation rtorrent

On installe toutes les dépendances :

apt install build-essential subversion autoconf g++ gcc curl comerr-dev pkg-config cfv libtool libssl-dev libncurses5-dev ncurses-term libsigc++-2.0-dev libcppunit-dev libcurl3 libcurl4-openssl-dev libtorrent-dev libxmlrpc-c++8-dev screen
cd /tmp
curl http://rtorrent.net/downloads/rtorrent-0.9.6.tar.gz | tar xz
cd rtorrent-0.9.6
./autogen.sh
./configure --with-xmlrpc-c
make -j $(nproc)

make install
ldconfig

automatiser certaines tâches

system.method.set_key = event.download.finished,notify_me,"execute=/home/vps/rtorrent-sync.sh"
#!/bin/bash
 
  rsync -az /srv/seedbox/downloads/* user@serveur:/path/to/movies/

Créer son service

nano  /etc/systemd/system/rtorrent.service
[Unit]
Description=rTorrent
After=network.target
 
[Service]
User=vps
Type=forking
KillMode=none
ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/local/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 /usr/local/bin/rtorrent
WorkingDirectory=%h
 
[Install]
WantedBy=default.target
systemctl daemon-reload
systemctl enable rtorrent.service
systemctl start rtorrent.service

Installation

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
 
 
git clone https://github.com/jfurrow/flood.git
cd flood
 
cp config.template.js config.js
 
npm install
npm install -g node-gyp
npm run build

Le mettre en tant que service

nano /etc/systemd/system/flood.service
[Service]
WorkingDirectory=/var/www/flood
ExecStart=/usr/bin/npm start
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=notell
User=www-data
Group=www-data
Environment=NODE_ENV=production
 
[Install]
WantedBy=multi-user.target

systemctl daemon-reload

systemctl start flood

systemctl enable flood </code>