mirror of
https://github.com/YunoHost-Apps/simple-torrent_ynh.git
synced 2024-09-03 20:26:18 +02:00
Testing (#79)
* Update upgrade * Update manifest.json * Auto-update README * Update restore * Update remove * Create DESCRIPTION.md * Auto-update README * Update DESCRIPTION.md * Auto-update README * Create updater.sh * Update arm64.src * Update manifest.json * Auto-update README * Update updater.sh * Update updater.sh * Update manifest.json * Upgrade to version 1.3.7 (#62) * Upgrade to v1.3.7 * Auto-update README Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: Yunohost-Bot <> * Update manifest.json * Update check_process * keep config (#67) * Update upgrade * Update manifest.json * Auto-update README * Auto-update README * 4.3 * Update manifest.json * Auto-update README * Update manifest.json * Auto-update README * Update upgrade * fix linter (#72) * Update manifest.json * Auto-update README * Auto-update README * Fix linter * Update manifest.json * Delete .DS_Store * Delete .DS_Store * Delete .DS_Store * V2 (#76) * Auto-update README * v2 * v2 * Update change_url * Delete .DS_Store * v2 * Auto-update README * Auto-update README * fix * Update restore --------- Co-authored-by: yunohost-bot <yunohost@yunohost.org> * Auto-update README * Auto-update README * fix * Update manifest.toml * Auto-update README * Upgrade auto-updater (#78) * [autopatch] Upgrade auto-updater * Auto-update README * [autopatch] Upgrade auto-updater --------- Co-authored-by: tituspijean <titus@pijean.ovh> * Auto-update README * Update manifest.toml * fix * Update scripts/install Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org> * Update scripts/install * Fix upgrade setup_source, same as install * Update manifest.toml * Auto-update README --------- Co-authored-by: Yunohost-Bot <> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: tituspijean <titus@pijean.ovh> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
This commit is contained in:
parent
407794da36
commit
e91af62c15
10 changed files with 36 additions and 106 deletions
4
.github/workflows/updater.yml
vendored
4
.github/workflows/updater.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Fetch the source code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Run the updater script
|
||||
|
@ -33,7 +33,7 @@ jobs:
|
|||
- name: Create Pull Request
|
||||
id: cpr
|
||||
if: ${{ env.PROCEED == 'true' }}
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
commit-message: Update to version ${{ env.VERSION }}
|
||||
|
|
|
@ -31,12 +31,16 @@ SimpleTorrent is a a self-hosted remote torrent client, written in Go (golang).
|
|||
- Magnet RSS subscribing supported
|
||||
|
||||
|
||||
**Shipped version:** 1.3.9~ynh6
|
||||
**Shipped version:** 1.3.9~ynh7
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
|
||||
## :red_circle: Antifeatures
|
||||
|
||||
- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc.
|
||||
|
||||
## Documentation and resources
|
||||
|
||||
* Official admin documentation: <https://github.com/boypt/simple-torrent/wiki>
|
||||
|
|
|
@ -31,12 +31,16 @@ SimpleTorrent is a a self-hosted remote torrent client, written in Go (golang).
|
|||
- Magnet RSS subscribing supported
|
||||
|
||||
|
||||
**Version incluse :** 1.3.9~ynh6
|
||||
**Version incluse :** 1.3.9~ynh7
|
||||
|
||||
## Captures d’écran
|
||||
|
||||

|
||||
|
||||
## :red_circle: Fonctions indésirables
|
||||
|
||||
- **Upstream not maintained**: This software is not maintained anymore. Expect it to break down over time, be exposed to unfixed security breaches, etc.
|
||||
|
||||
## Documentations et ressources
|
||||
|
||||
* Documentation officielle de l’admin : <https://github.com/boypt/simple-torrent/wiki>
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
SOURCE_URL=https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_amd64_static.gz
|
||||
SOURCE_SUM=d2f535e4cd0449b357a563cfce79c1f6afcac9b7b3af94e758defc44faa52ebf
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=gz
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
|
@ -1,6 +0,0 @@
|
|||
SOURCE_URL=https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_arm64_static.gz
|
||||
SOURCE_SUM=6f48f8b59bc8d834c6ede1d27ecc1a598b8a0be1dab00622caa6fd047e51eed6
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=gz
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
|
@ -1,6 +0,0 @@
|
|||
SOURCE_URL=https://github.com/boypt/simple-torrent/releases/download/1.3.9/cloud-torrent_linux_386_static.gz
|
||||
SOURCE_SUM=583898eb907c21dbbcb6f33934eae3dc1d6ec2620fdc7689c70a3479049af52b
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=gz
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_EXTRACT=false
|
|
@ -5,7 +5,7 @@ name = "Simple Torrent"
|
|||
description.en = "Self-hosted remote torrent client"
|
||||
description.fr = "Client torrent distant auto-hébergé"
|
||||
|
||||
version = "1.3.9~ynh6"
|
||||
version = "1.3.9~ynh7"
|
||||
|
||||
maintainers = ["eric_G"]
|
||||
|
||||
|
@ -15,7 +15,7 @@ admindoc = "https://github.com/boypt/simple-torrent/wiki"
|
|||
code = "https://github.com/boypt/simple-torrent"
|
||||
|
||||
[integration]
|
||||
yunohost = ">= 11.1.7"
|
||||
yunohost = ">= 11.1.15"
|
||||
architectures = ["amd64","i386", "arm64"]
|
||||
multi_instance = true
|
||||
ldap = false
|
||||
|
@ -33,10 +33,24 @@ ram.runtime = "50M"
|
|||
default = "/simple-torrent"
|
||||
|
||||
[install.init_main_permission]
|
||||
help.en = "If enabled, Simple Torrent will be accessible by people who do not have an account. This can be changed later via the webadmin."
|
||||
help.fr = "Si cette case est cochée, Simple Torrent sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
|
||||
type = "group"
|
||||
default = "visitors"
|
||||
|
||||
[resources]
|
||||
|
||||
[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"
|
||||
extract = false
|
||||
in_subdir = false
|
||||
|
||||
[resources.system_user]
|
||||
|
||||
[resources.install_dir]
|
||||
|
|
|
@ -9,49 +9,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# RETRIEVE ARGUMENTS
|
||||
#=================================================
|
||||
|
||||
old_domain=$YNH_APP_OLD_DOMAIN
|
||||
old_path=$YNH_APP_OLD_PATH
|
||||
|
||||
new_domain=$YNH_APP_NEW_DOMAIN
|
||||
new_path=$YNH_APP_NEW_PATH
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up $app before changing its URL (may take a while)..." --weight=1
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
|
||||
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
|
||||
# restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# CHECK WHICH PARTS SHOULD BE CHANGED
|
||||
#=================================================
|
||||
|
||||
change_domain=0
|
||||
if [ "$old_domain" != "$new_domain" ]
|
||||
then
|
||||
change_domain=1
|
||||
fi
|
||||
|
||||
change_path=0
|
||||
if [ "$old_path" != "$new_path" ]
|
||||
then
|
||||
change_path=1
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
#=================================================
|
||||
|
@ -66,29 +23,7 @@ ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$
|
|||
#=================================================
|
||||
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
||||
|
||||
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
||||
|
||||
# Change the path in the NGINX config file
|
||||
if [ $change_path -eq 1 ]
|
||||
then
|
||||
# Make a backup of the original NGINX config file if modified
|
||||
ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
|
||||
# Set global variables for NGINX helper
|
||||
domain="$old_domain"
|
||||
path_url="$new_path"
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
fi
|
||||
|
||||
# Change the domain for NGINX
|
||||
if [ $change_domain -eq 1 ]
|
||||
then
|
||||
# Delete file checksum for the old conf file location
|
||||
ynh_delete_file_checksum --file="$nginx_conf_path"
|
||||
mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf
|
||||
# Store file checksum for the new config file location
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
fi
|
||||
ynh_change_url_nginx_config
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
|
@ -100,13 +35,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
|
|||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -15,14 +15,13 @@ source /usr/share/yunohost/helpers
|
|||
ynh_script_progression --message="Setting up source files..." --weight=4
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir=$install_dir --source_id=$YNH_ARCH
|
||||
ynh_setup_source --dest_dir=$install_dir
|
||||
|
||||
pushd "$install_dir"
|
||||
gzip --decompress $YNH_ARCH.gz
|
||||
mv $YNH_ARCH $app
|
||||
gzip --decompress main --to-stdout > main_dezipped
|
||||
mv main_dezipped $app
|
||||
popd
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chmod +x $install_dir/$app
|
||||
|
|
|
@ -33,15 +33,14 @@ 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 --source_id=$YNH_ARCH --keep="config.yml"
|
||||
ynh_setup_source --dest_dir=$install_dir --keep="config.yml"
|
||||
|
||||
pushd "$install_dir"
|
||||
gzip --decompress $YNH_ARCH.gz
|
||||
mv $YNH_ARCH $app
|
||||
gzip --decompress main --to-stdout > main_dezipped
|
||||
mv main_dezipped $app
|
||||
popd
|
||||
fi
|
||||
|
||||
chmod 750 "$install_dir"
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
chmod +x $install_dir/$app
|
||||
|
|
Loading…
Add table
Reference in a new issue