2017-07-15 11:39:52 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-07-19 22:40:20 +02:00
|
|
|
# Exit on command errors and treat unset variables as an error
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
# See comments in install script
|
|
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
|
2017-07-18 23:04:22 +02:00
|
|
|
sudo service rtorrent stop
|
|
|
|
sudo service flood stop
|
2017-07-15 11:39:52 +02:00
|
|
|
|
2017-07-18 23:04:22 +02:00
|
|
|
# Build libtorrent
|
|
|
|
cd /tmp
|
|
|
|
if [ -d libtorrent ]; then
|
|
|
|
sudo rm -r libtorrent
|
2017-07-15 11:39:52 +02:00
|
|
|
fi
|
2017-07-18 23:04:22 +02:00
|
|
|
sudo git clone https://github.com/rakshasa/libtorrent.git
|
|
|
|
cd libtorrent
|
|
|
|
sudo git checkout 0.13.6
|
|
|
|
sudo ./autogen.sh
|
|
|
|
sudo ./configure
|
|
|
|
sudo make
|
|
|
|
sudo make install
|
|
|
|
|
|
|
|
# Build rtorrent
|
|
|
|
cd /tmp
|
|
|
|
if [ -d rtorrent ]; then
|
|
|
|
sudo rm -r rtorrent
|
2017-07-15 11:39:52 +02:00
|
|
|
fi
|
2017-07-18 23:04:22 +02:00
|
|
|
sudo git clone https://github.com/rakshasa/rtorrent.git
|
|
|
|
cd rtorrent
|
|
|
|
sudo git checkout 0.9.6
|
|
|
|
sudo ./autogen.sh
|
|
|
|
sudo ./configure --with-xmlrpc-c
|
|
|
|
sudo make
|
|
|
|
sudo make install
|
|
|
|
|
|
|
|
sudo ldconfig
|
|
|
|
|
2017-11-19 18:07:45 +01:00
|
|
|
# Update Flood
|
2017-07-19 22:40:20 +02:00
|
|
|
cd /var/www/flood
|
2017-07-18 23:04:22 +02:00
|
|
|
git pull
|
2017-07-19 22:40:20 +02:00
|
|
|
chown -R flood:flood /var/www/flood
|
|
|
|
|
|
|
|
# If app is public, add url to SSOWat conf as skipped_uris
|
|
|
|
if [[ $is_public -eq 1 ]]; then
|
|
|
|
# See install script
|
|
|
|
ynh_app_setting_set "$app" unprotected_uris "/"
|
|
|
|
fi
|
2017-07-18 23:04:22 +02:00
|
|
|
|
|
|
|
sudo service rtorrent start
|
|
|
|
sudo service flood start
|