1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lidarr_ynh.git synced 2024-09-03 19:35:58 +02:00

Merge pull request #18 from YunoHost-Apps/testing

Testing
This commit is contained in:
tituspijean 2023-09-27 00:09:59 +02:00 committed by GitHub
commit ab1f897132
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 26 additions and 80 deletions

View file

@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Music collection manager for Usenet and BitTorrent users Music collection manager for Usenet and BitTorrent users
**Shipped version:** 1.0.2.2592~ynh2 **Shipped version:** 1.3.5.3530~ynh2
## Screenshots ## Screenshots

View file

@ -18,7 +18,7 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Music collection manager for Usenet and BitTorrent users Music collection manager for Usenet and BitTorrent users
**Version incluse :** 1.0.2.2592~ynh2 **Version incluse :** 1.3.5.3530~ynh2
## Captures décran ## Captures décran

View file

@ -5,7 +5,7 @@ name = "Lidarr"
description.en = "Music collection manager for Usenet and BitTorrent users" description.en = "Music collection manager for Usenet and BitTorrent users"
description.fr = "Gestionnaire de discothèque pour utilisateurs de Usenet et BitTorrent" description.fr = "Gestionnaire de discothèque pour utilisateurs de Usenet et BitTorrent"
version = "1.0.2.2592~ynh2" version = "1.3.5.3530~ynh2"
maintainers = ["tituspijean"] maintainers = ["tituspijean"]
@ -16,7 +16,7 @@ admindoc = "https://wiki.servarr.com/Lidarr"
code = "https://github.com/Lidarr/Lidarr" code = "https://github.com/Lidarr/Lidarr"
[integration] [integration]
yunohost = ">= 11.1.15" yunohost = ">= 11.1.19"
architectures = "all" architectures = "all"
multi_instance = true multi_instance = true
ldap = false ldap = false
@ -38,14 +38,14 @@ ram.runtime = "50M"
[resources] [resources]
[resources.sources.main] [resources.sources.main]
arm64.url = "https://github.com/Lidarr/Lidarr/releases/download/v1.0.2.2592/Lidarr.master.1.0.2.2592.linux-core-arm64.tar.gz" arm64.url = "https://github.com/Lidarr/Lidarr/releases/download/v1.3.5.3530/Lidarr.master.1.3.5.3530.linux-core-arm64.tar.gz"
arm64.sha256 = "c870286712de285ea6951fc0bf4107d0b8765eab8cf55c7a86e3434c4b38c325" arm64.sha256 = "c4c4696e0dfb43d5484628a8cb79144b4d0cd33c424f51b8dfda4d59d8127ba0"
amd64.url = "https://github.com/Lidarr/Lidarr/releases/download/v1.0.2.2592/Lidarr.master.1.0.2.2592.linux-core-x64.tar.gz" amd64.url = "https://github.com/Lidarr/Lidarr/releases/download/v1.3.5.3530/Lidarr.master.1.3.5.3530.linux-core-x64.tar.gz"
amd64.sha256 = "8ae236e204fbfd1159f7173872c77ecd61333d23ecc6a618e45fbbf085918f14" amd64.sha256 = "0e976c83de76870deb6b6e3f44479d7e6fd2ddc3a871f4abc63479bc63bf6f91"
armhf.url = "https://github.com/Lidarr/Lidarr/releases/download/v1.0.2.2592/Lidarr.master.1.0.2.2592.linux-core-arm.tar.gz" armhf.url = "https://github.com/Lidarr/Lidarr/releases/download/v1.3.5.3530/Lidarr.master.1.3.5.3530.linux-core-arm.tar.gz"
armhf.sha256 = "dc59225da4490b40bea386d5ec5a305d43706447dbfea05f84505bc21b4425e5" armhf.sha256 = "764fb0c756c6c8f4d4ea4156158e37ae0e68fca234989051fdfe533d3e3ae93c"
i386.url = "https://github.com/Lidarr/Lidarr/releases/download/v1.0.2.2592/Lidarr.master.1.0.2.2592.linux-core-x86.tar.gz" i386.url = "https://github.com/Lidarr/Lidarr/releases/download/v1.3.5.3530/Lidarr.master.1.3.5.3530.linux-core-x86.tar.gz"
i386.sha256 = "4e0a3828f9479c9b99210536903660839f38e5dd2764514d69b9661e0d087d00" i386.sha256 = "5b531cfe81b8688c1f34fcebee35b67ee72ee3c7afc2b616cd5514eb7fee9823"
autoupdate.strategy = "latest_github_release" autoupdate.strategy = "latest_github_release"
autoupdate.asset.amd64 = ".*linux-core-x64.tar.gz" autoupdate.asset.amd64 = ".*linux-core-x64.tar.gz"
@ -60,10 +60,11 @@ ram.runtime = "50M"
[resources.install_dir] [resources.install_dir]
[resources.data_dir] [resources.data_dir]
subdirs = ["logs"]
[resources.permissions] [resources.permissions]
main.url = "/" main.url = "/"
api.main.url = "/api" api.url = "/api"
api.allowed = "visitors" api.allowed = "visitors"
api.show_tile = false api.show_tile = false
api.protected = true api.protected = true

View file

@ -25,7 +25,7 @@ ynh_backup --src_path="$install_dir"
# BACKUP THE APP DATA DIR # BACKUP THE APP DATA DIR
#================================================= #=================================================
ynh_backup --src_path="$data_dir" ynh_backup --src_path="$data_dir" --is_big
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # BACKUP THE NGINX CONFIGURATION

View file

@ -17,9 +17,6 @@ ynh_script_progression --message="Setting up source files..." --weight=3
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir"
mkdir -p "$data_dir/logs"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app: "$install_dir" chown -R $app: "$install_dir"

View file

@ -10,10 +10,11 @@ source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# STANDARD REMOVE # REMOVE SYSTEM CONFIGURATIONS
#================================================= #=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST # REMOVE SYSTEMD SERVICE
#================================================= #=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# 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`)
if ynh_exec_warn_less yunohost service status $app >/dev/null if ynh_exec_warn_less yunohost service status $app >/dev/null
@ -22,45 +23,15 @@ then
yunohost service remove $app yunohost service remove $app
fi fi
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
# Remove the dedicated systemd config # Remove the dedicated systemd config
ynh_remove_systemd_config ynh_remove_systemd_config
#=================================================
# REMOVE APP DATA DIR
#=================================================
ynh_script_progression --message="Removing app data directory..." --weight=1
# Remove the app directory securely
ynh_secure_remove --file="$data_dir"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Removing logrotate configuration..." --weight=1
# Remove the app-specific logrotate config # Remove the app-specific logrotate config
ynh_remove_logrotate ynh_remove_logrotate
#=================================================
# SPECIFIC REMOVE
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression --message="Removing various files..." --weight=1
# Remove the log files # Remove the log files
ynh_secure_remove --file="/var/log/$app" ynh_secure_remove --file="/var/log/$app"

View file

@ -26,7 +26,6 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$install_dir" ynh_restore_file --origin_path="$install_dir"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app: "$install_dir" chown -R $app: "$install_dir"
@ -35,10 +34,8 @@ chown -R $app: "$install_dir"
#================================================= #=================================================
ynh_script_progression --message="Restoring the app data directory..." --weight=2 ynh_script_progression --message="Restoring the app data directory..." --weight=2
ynh_restore_file --origin_path="$data_dir" ynh_restore_file --origin_path="$data_dir" --not_mandatory
chmod 750 "$data_dir"
chmod -R o-rwx "$data_dir"
chown -R $app: "$data_dir" chown -R $app: "$data_dir"
chmod 400 "$data_dir/config.xml" chmod 400 "$data_dir/config.xml"

View file

@ -36,28 +36,25 @@ then
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir"
fi fi
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app: "$install_dir" chown -R $app: "$install_dir"
#================================================= #=================================================
# NGINX CONFIGURATION # REAPPLY SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
#=================================================
# SPECIFIC UPGRADE
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append --logfile="$data_dir/logs"
yunohost service add $app --description="Lidarr daemon" --log="$data_dir/logs/lidarr.txt"
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
#================================================= #=================================================
@ -68,23 +65,6 @@ ynh_add_config --template="../conf/config.xml" --destination="$data_dir/config.x
chmod 400 "$data_dir/config.xml" chmod 400 "$data_dir/config.xml"
chown $app:$app "$data_dir/config.xml" chown $app:$app "$data_dir/config.xml"
#=================================================
# GENERIC FINALIZATION
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append --logfile="$data_dir/logs"
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description="Lidarr daemon" --log="$data_dir/logs/lidarr.txt"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================