diff --git a/README.md b/README.md index 9a71bd1..9802ee5 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/README_fr.md b/README_fr.md index 6d1be30..8e9441c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -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 diff --git a/doc/screenshots/screenshot.png b/doc/screenshots/screenshot.png new file mode 100644 index 0000000..f44abd4 Binary files /dev/null and b/doc/screenshots/screenshot.png differ diff --git a/manifest.json b/manifest.json index 136bd5e..ba7600d 100644 --- a/manifest.json +++ b/manifest.json @@ -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", diff --git a/scripts/install b/scripts/install index 2ed205e..1aa7825 100755 --- a/scripts/install +++ b/scripts/install @@ -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 #================================================= diff --git a/scripts/restore b/scripts/restore index 596b61c..05677ae 100755 --- a/scripts/restore +++ b/scripts/restore @@ -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" diff --git a/scripts/upgrade b/scripts/upgrade index fee9cef..babbe4c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 #=================================================