mirror of
https://github.com/YunoHost-Apps/flood_ynh.git
synced 2024-09-03 18:36:20 +02:00
52 lines
No EOL
1,001 B
Bash
Executable file
52 lines
No EOL
1,001 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Exit on command errors and treat unset variables as an error
|
|
set -eu
|
|
|
|
# See comments in install script
|
|
app=$YNH_APP_INSTANCE_NAME
|
|
|
|
sudo service rtorrent stop
|
|
sudo service flood stop
|
|
|
|
# Build libtorrent
|
|
cd /tmp
|
|
if [ -d libtorrent ]; then
|
|
sudo rm -r libtorrent
|
|
fi
|
|
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
|
|
fi
|
|
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
|
|
|
|
# Update Flood
|
|
cd /var/www/flood
|
|
git pull
|
|
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
|
|
|
|
sudo service rtorrent start
|
|
sudo service flood start |