From 5a7d74b7175cc1b8233a66003ba2f557398d255a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 19 Jun 2024 11:33:39 +0200 Subject: [PATCH] fix --- conf/config.default.yml | 4 ++-- doc/ADMIN.md | 6 +----- doc/ADMIN_fr.md | 6 +----- manifest.toml | 14 +++++++------- scripts/backup | 4 ---- scripts/install | 2 +- scripts/remove | 1 - scripts/upgrade | 26 ++++++++------------------ 8 files changed, 20 insertions(+), 43 deletions(-) diff --git a/conf/config.default.yml b/conf/config.default.yml index a529ea6..1d1691c 100644 --- a/conf/config.default.yml +++ b/conf/config.default.yml @@ -29,10 +29,10 @@ DisableUTP: false NoDefaultPortForwarding: true # Don't broadcast the UPNP request for gateway port forwarding, which is unnecessary in machines that has public IP (of which this program is mean for?) -DownloadDirectory: /home/yunohost.app/__APP__/downloads +DownloadDirectory: __DATA_DIR__/downloads # DisableEncryption A switch disables [BitTorrent protocol encryption](https://en.wikipedia.org/wiki/BitTorrent_protocol_encryption) -WatchDirectory: /home/yunohost.app/__APP__/torrents +WatchDirectory: __DATA_DIR__/torrents # DownloadDirectory The directory where downloaded file saves. EnableUpload: true diff --git a/doc/ADMIN.md b/doc/ADMIN.md index 79173d1..c7bc217 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -2,8 +2,4 @@ Most of the items can be edited in Web-UI on the fly in the config board. -You can also configure Simple Torrent by editing this file `/var/www/simple-torrent/config.yml` using the [documentation](https://github.com/boypt/simple-torrent/wiki/Config-File). - -## Limitations - -- This app cannot be installed on a 32-bit ARM machine. +You can also configure Simple Torrent by editing this file `__INSTALL_DIR__/config.yml` using the [documentation](https://github.com/boypt/simple-torrent/wiki/Config-File). diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index eca4d56..33b5a2c 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -2,8 +2,4 @@ La plupart des éléments peuvent être modifiés à la volée dans Web-UI dans la page de configuration. -Vous pouvez configurer Simple Torrent en modifiant le fichier `/var/www/simple-torrent/config.yml` en vous aidant de la [documentation](https://github.com/boypt/simple-torrent/wiki/Config-File). - -## Limitations - -- Cette application ne peut pas être installée sur une machine ARM 32 bits. +Vous pouvez configurer Simple Torrent en modifiant le fichier `__DATA_DIR__/config.yml` en vous aidant de la [documentation](https://github.com/boypt/simple-torrent/wiki/Config-File). diff --git a/manifest.toml b/manifest.toml index ff592ba..b4c9f26 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,7 @@ code = "https://github.com/jpillora/cloud-torrent" [integration] yunohost = ">= 11.2" -architectures = ["amd64","i386", "arm64"] +architectures = ["amd64","armhf", "arm64"] multi_instance = true ldap = false sso = false @@ -42,12 +42,12 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - amd64.url = "https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_amd64_static.gz" - amd64.sha256 = "d2f535e4cd0449b357a563cfce79c1f6afcac9b7b3af94e758defc44faa52ebf" - arm64.url = "https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_arm64_static.gz" - arm64.sha256 = "6f48f8b59bc8d834c6ede1d27ecc1a598b8a0be1dab00622caa6fd047e51eed6" - i386.url = "https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_386_static.gz" - i386.sha256 = "583898eb907c21dbbcb6f33934eae3dc1d6ec2620fdc7689c70a3479049af52b" + amd64.url = "https://github.com/jpillora/cloud-torrent/releases/download/v0.9.1/cloud-torrent_0.9.1_linux_amd64.gz" + amd64.sha256 = "21b7ce6eb9be944f7497811aea368a098c1976d61c5ed854a0003e455be13ca1" + arm64.url = "https://github.com/jpillora/cloud-torrent/releases/download/v0.9.1/cloud-torrent_0.9.1_linux_arm64.gz" + arm64.sha256 = "a4877e546d1d8844a745c6fbb0490aa43f06815833e23af4d9f37e1ecc198637" + i386.url = "https://github.com/jpillora/cloud-torrent/releases/download/v0.9.1/cloud-torrent_0.9.1_linux_armv7.gz" + i386.sha256 = "1038f55c5c6a4b0414e291c647f1b7f4c859f8c0de61a323abd7e087b9095bdc" extract = false in_subdir = false diff --git a/scripts/backup b/scripts/backup index 2d322c2..fd14fd3 100644 --- a/scripts/backup +++ b/scripts/backup @@ -32,10 +32,6 @@ ynh_backup --src_path="$data_dir" --is_big ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/install b/scripts/install index e171818..ea78935 100644 --- a/scripts/install +++ b/scripts/install @@ -43,7 +43,7 @@ yunohost service add $app --description="Self-hosted remote torrent client" --ne #================================================= ynh_script_progression --message="Modifying a config file..." --weight=1 -ynh_add_config --template="../conf/config.default.yml" --destination="$install_dir/config.yml" +ynh_add_config --template="config.default.yml" --destination="$install_dir/config.yml" chmod 400 "$install_dir/config.yml" chown $app:$app "$install_dir/config.yml" diff --git a/scripts/remove b/scripts/remove index 2848d21..94e73f3 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,6 @@ source /usr/share/yunohost/helpers #================================================= # REMOVE SYSTEMD SERVICE #================================================= - ynh_script_progression --message="Removing system configurations related to $app..." --weight=5 # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) diff --git a/scripts/upgrade b/scripts/upgrade index 5b57423..852f2d0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -27,19 +21,15 @@ ynh_systemd_action --service_name=$app --action=stop --log_path=systemd #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=5 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Upgrading source files..." --weight=5 +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir=$install_dir --keep="config.yml" - # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir=$install_dir --keep="config.yml" - - pushd "$install_dir" - gzip --decompress main --to-stdout > main_dezipped - mv main_dezipped $app - popd -fi +pushd "$install_dir" + gzip --decompress main --to-stdout > main_dezipped + mv main_dezipped $app +popd chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -62,7 +52,7 @@ yunohost service add $app --description="Self-hosted remote torrent client" --ne #================================================= # ynh_script_progression --message="Modifying a config file..." --weight=1 -# ynh_add_config --template="../conf/config.default.yml" --destination="$install_dir/config.yml" +# ynh_add_config --template="config.default.yml" --destination="$install_dir/config.yml" #================================================= # START SYSTEMD SERVICE