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

Merge pull request #5 from YunoHost-Apps/testing

Fix restore
This commit is contained in:
yalh76 2022-03-26 13:50:58 +01:00 committed by GitHub
commit 3f43e4ec8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 37 additions and 23 deletions

View file

@ -17,10 +17,14 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Client torrent.
**Shipped version:** 4.7.0~ynh1
**Shipped version:** 4.7.0~ynh2
## Screenshots
![](./doc/screenshots/screenshot.png)
## Documentation and resources
* Official app website: https://github.com/jesec/flood

View file

@ -13,10 +13,14 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
Torrent client.
**Version incluse :** 4.7.0~ynh1
**Version incluse :** 4.7.0~ynh2
## Captures d'écran
![](./doc/screenshots/screenshot.png)
## Documentations et ressources
* Site officiel de l'app : https://github.com/jesec/flood

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

View file

@ -6,7 +6,7 @@
"en": "Client torrent.",
"fr": "Torrent client."
},
"version": "4.7.0~ynh1",
"version": "4.7.0~ynh2",
"url": "https://github.com/jesec/flood",
"upstream": {
"license": "GPL-3.0-or-later",

View file

@ -78,6 +78,11 @@ ynh_script_progression --message="Installing dependencies..."
ynh_install_app_dependencies $pkg_dependencies
tmpdir="$(mktemp -d)"
ynh_setup_source --dest_dir="$tmpdir" --source_id=$YNH_ARCH
dpkg -i $tmpdir/flood-linux.deb
ynh_secure_remove --file="$tmpdir"
#=================================================
# CREATE DEDICATED USER
#=================================================
@ -93,7 +98,7 @@ ynh_script_progression --message="Setting up source files..."
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --source_id=$YNH_ARCH
mkdir -p "$final_path"
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
@ -109,14 +114,6 @@ ynh_add_nginx_config
#=================================================
# SPECIFIC SETUP
#=================================================
# INSTALL APP
#=================================================
ynh_script_progression --message="Installing app..."
dpkg -i $final_path/flood-linux.deb
ynh_secure_remove --file="$final_path/flood-linux.deb"
#=================================================
# CREATE DATA DIRECTORY
#=================================================

View file

@ -31,7 +31,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
port=$(ynh_app_setting_get --app=$app --key=port)
scgi_port=$(ynh_app_setting_get --app=$app --key=scgi_port)
rt_port=$(ynh_app_setting_get --app=$app --key=rt_port)
@ -94,6 +93,20 @@ ynh_script_progression --message="Reinstalling dependencies..."
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
tmpdir="$(mktemp -d)"
ynh_setup_source --dest_dir="$tmpdir" --source_id=$YNH_ARCH
dpkg -i $tmpdir/flood-linux.deb
ynh_secure_remove --file="$tmpdir"
#=================================================
# OPEN A PORT
#=================================================
ynh_script_progression --message="Finding an available port..."
# Open the port
ynh_script_progression --message="Configuring firewall..."
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $rt_port
#=================================================
# RESTORE SYSTEMD
#=================================================
@ -117,7 +130,6 @@ yunohost service add $app-rtorrent --needs_exposed_ports $rt_port
#=================================================
ynh_script_progression --message="Starting a systemd service..."
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start"
ynh_systemd_action --service_name=$app-rtorrent --action="start"

View file

@ -73,7 +73,7 @@ then
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --source_id=$YNH_ARCH
mkdir -p "$final_path"
fi
chmod 750 "$final_path"
@ -95,16 +95,13 @@ ynh_script_progression --message="Upgrading dependencies..."
ynh_install_app_dependencies $pkg_dependencies
tmpdir="$(mktemp -d)"
ynh_setup_source --dest_dir="$tmpdir" --source_id=$YNH_ARCH
dpkg -i $tmpdir/flood-linux.deb
ynh_secure_remove --file="$tmpdir"
#=================================================
# SPECIFIC UPGRADE
#=================================================
# INSTALL APP
#=================================================
ynh_script_progression --message="Installing app..."
dpkg -i $final_path/flood-linux.deb
ynh_secure_remove --file="$final_path/flood-linux.deb"
#=================================================
# SETUP SYSTEMD
#=================================================