1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/simple-torrent_ynh.git synced 2024-09-03 20:26:18 +02:00
This commit is contained in:
Éric Gaspar 2024-06-19 11:33:39 +02:00
parent 149dbec34f
commit 5a7d74b717
8 changed files with 20 additions and 43 deletions

View file

@ -29,10 +29,10 @@ DisableUTP: false
NoDefaultPortForwarding: true 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?) # 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) # 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. # DownloadDirectory The directory where downloaded file saves.
EnableUpload: true EnableUpload: true

View file

@ -2,8 +2,4 @@
Most of the items can be edited in Web-UI on the fly in the config board. 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). 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).
## Limitations
- This app cannot be installed on a 32-bit ARM machine.

View file

@ -2,8 +2,4 @@
La plupart des éléments peuvent être modifiés à la volée dans Web-UI dans la page de configuration. 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). 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).
## Limitations
- Cette application ne peut pas être installée sur une machine ARM 32 bits.

View file

@ -16,7 +16,7 @@ code = "https://github.com/jpillora/cloud-torrent"
[integration] [integration]
yunohost = ">= 11.2" yunohost = ">= 11.2"
architectures = ["amd64","i386", "arm64"] architectures = ["amd64","armhf", "arm64"]
multi_instance = true multi_instance = true
ldap = false ldap = false
sso = false sso = false
@ -42,12 +42,12 @@ ram.runtime = "50M"
[resources.sources] [resources.sources]
[resources.sources.main] [resources.sources.main]
amd64.url = "https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_amd64_static.gz" amd64.url = "https://github.com/jpillora/cloud-torrent/releases/download/v0.9.1/cloud-torrent_0.9.1_linux_amd64.gz"
amd64.sha256 = "d2f535e4cd0449b357a563cfce79c1f6afcac9b7b3af94e758defc44faa52ebf" amd64.sha256 = "21b7ce6eb9be944f7497811aea368a098c1976d61c5ed854a0003e455be13ca1"
arm64.url = "https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_arm64_static.gz" arm64.url = "https://github.com/jpillora/cloud-torrent/releases/download/v0.9.1/cloud-torrent_0.9.1_linux_arm64.gz"
arm64.sha256 = "6f48f8b59bc8d834c6ede1d27ecc1a598b8a0be1dab00622caa6fd047e51eed6" arm64.sha256 = "a4877e546d1d8844a745c6fbb0490aa43f06815833e23af4d9f37e1ecc198637"
i386.url = "https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_386_static.gz" i386.url = "https://github.com/jpillora/cloud-torrent/releases/download/v0.9.1/cloud-torrent_0.9.1_linux_armv7.gz"
i386.sha256 = "583898eb907c21dbbcb6f33934eae3dc1d6ec2620fdc7689c70a3479049af52b" i386.sha256 = "1038f55c5c6a4b0414e291c647f1b7f4c859f8c0de61a323abd7e087b9095bdc"
extract = false extract = false
in_subdir = false in_subdir = false

View file

@ -32,10 +32,6 @@ ynh_backup --src_path="$data_dir" --is_big
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP SYSTEMD
#=================================================
ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_backup --src_path="/etc/systemd/system/$app.service"
#================================================= #=================================================

View file

@ -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_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" chmod 400 "$install_dir/config.yml"
chown $app:$app "$install_dir/config.yml" chown $app:$app "$install_dir/config.yml"

View file

@ -12,7 +12,6 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
# REMOVE SYSTEMD SERVICE # REMOVE SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=5 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`) # Remove the service from the list of services known by YunoHost (added from `yunohost service add`)

View file

@ -9,12 +9,6 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# STANDARD UPGRADE STEPS # STANDARD UPGRADE STEPS
#================================================= #=================================================
@ -27,19 +21,15 @@ ynh_systemd_action --service_name=$app --action=stop --log_path=systemd
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..." --weight=5
if [ "$upgrade_type" == "UPGRADE_APP" ] # Download, check integrity, uncompress and patch the source from app.src
then ynh_setup_source --dest_dir=$install_dir --keep="config.yml"
ynh_script_progression --message="Upgrading source files..." --weight=5
# Download, check integrity, uncompress and patch the source from app.src pushd "$install_dir"
ynh_setup_source --dest_dir=$install_dir --keep="config.yml"
pushd "$install_dir"
gzip --decompress main --to-stdout > main_dezipped gzip --decompress main --to-stdout > main_dezipped
mv main_dezipped $app mv main_dezipped $app
popd popd
fi
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$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_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 # START SYSTEMD SERVICE