mirror of
https://github.com/YunoHost-Apps/flood_ynh.git
synced 2024-09-03 18:36:20 +02:00
Add path url in config
This commit is contained in:
parent
1a160de4c7
commit
49522d0447
4 changed files with 17 additions and 12 deletions
|
@ -1,8 +1,8 @@
|
||||||
location / {
|
location PATH/api {
|
||||||
if ($scheme = http) {
|
proxy_pass http://127.0.0.1:3000;
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
|
||||||
}
|
}
|
||||||
proxy_pass http://localhost:3000/;
|
|
||||||
proxy_set_header Host $host;
|
location PATH {
|
||||||
proxy_buffering off;
|
alias /usr/lib/node_modules/flood/dist/assets/;
|
||||||
|
try_files $uri PATH/index.html;
|
||||||
}
|
}
|
|
@ -62,6 +62,7 @@ sudo npm i -g flood
|
||||||
|
|
||||||
# Launch flood on boot
|
# Launch flood on boot
|
||||||
cd $current_dir
|
cd $current_dir
|
||||||
|
ynh_replace_string "PATH" "$path_url" ../sources/flood.service
|
||||||
sudo cp ../sources/flood.service /etc/systemd/system/flood.service
|
sudo cp ../sources/flood.service /etc/systemd/system/flood.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl enable flood.service
|
systemctl enable flood.service
|
||||||
|
@ -80,6 +81,7 @@ sudo yunohost service add rtorrent
|
||||||
sudo yunohost service add flood
|
sudo yunohost service add flood
|
||||||
|
|
||||||
# nginx config
|
# nginx config
|
||||||
|
ynh_replace_string "PATH" "$path_url" ../conf/nginx.conf
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Start rtorrent and flood
|
# Start rtorrent and flood
|
||||||
|
|
|
@ -4,7 +4,7 @@ After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/var/www/flood
|
WorkingDirectory=/var/www/flood
|
||||||
ExecStart=/usr/bin/npm start --production /var/www/flood
|
ExecStart=/usr/bin/npm start --production /var/www/flood --baseuri=PATH
|
||||||
User=flood
|
User=flood
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Flood Web UI
|
Description=rTorrent
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=~
|
|
||||||
ExecStart=/usr/bin/flood
|
|
||||||
User=flood
|
User=flood
|
||||||
|
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]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=default.target
|
Loading…
Reference in a new issue