1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flood_ynh.git synced 2024-09-03 18:36:20 +02:00

path update

This commit is contained in:
Taker 2017-07-19 22:40:20 +02:00
parent 847d627c49
commit d65e03d02b
4 changed files with 24 additions and 8 deletions

View file

@ -86,9 +86,9 @@ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
# Clone flood
cd /home/flood
git clone https://github.com/jfurrow/flood.git
cp
cd /var/www
git clone https://github.com/jfurrow/flood.git
cp
# Launch flood on boot
sudo cp ../sources/flood.service /etc/systemd/system/flood.service
@ -111,4 +111,5 @@ sudo yunohost app setting flood data_dir -v $data_dir
sudo yunohost app setting flood path -v $path
# Register the service on yunohost
sudo yunohost service add rtorrent
sudo yunohost service add rtorrent
sudo yunohost service add flood

View file

@ -1,4 +1,6 @@
#!/bin/bash
domain=$(sudo yunohost app setting flood domain)
data_dir=$(sudo yunohost app setting flood data_dir)
@ -12,7 +14,7 @@ sudo rm -f /etc/systemd/system/rtorrent.service
# Remove the user
sudo userdel -f flood
sudo rm -rf /home/flood
sudo rm -rf /var/www/flood
# Remove the service
sudo yunohost service remove flood

View file

@ -1,5 +1,11 @@
#!/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
@ -32,8 +38,15 @@ sudo make install
sudo ldconfig
# Update ruTorrent
cd /home/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

View file

@ -3,8 +3,8 @@ Description=Flood rTorrent Web UI
After=network.target
[Service]
WorkingDirectory=/home/flood
ExecStart=/usr/bin/npm start --production /home/flood
WorkingDirectory=/var/www/flood
ExecStart=/usr/bin/npm start --production /var/www/flood
User=flood
[Install]