1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/navidrome_ynh.git synced 2024-09-03 19:46:30 +02:00
* Cleaning up
* Upgrade to version 0.41.0
This commit is contained in:
Éric Gaspar 2021-03-24 09:34:07 +01:00 committed by GitHub
parent e41c919ddb
commit 647b52ed90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 59 additions and 73 deletions

View file

@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## Overview ## Overview
Navidrome is an open source web-based music collection server and streamer. It gives you freedom to listen to your music collection from any browser or mobile device. Navidrome is an open source web-based music collection server and streamer. It gives you freedom to listen to your music collection from any browser or mobile device.
**Shipped version:** 0.40.0 **Shipped version:** 0.41.0
## Screenshots ## Screenshots
@ -36,7 +36,7 @@ You must activate *public site* if you want to connect a client player to Navidr
## Documentation ## Documentation
* Official documentation: https://www.navidrome.org/docs/ * Official documentation: https://www.navidrome.org/docs/
* YunoHost documentation: https://yunohost.org/#/app_navidrome * YunoHost documentation: https://yunohost.org/en/app_navidrome
## YunoHost specific features ## YunoHost specific features

View file

@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install
## Vue d'ensemble ## Vue d'ensemble
Navidrome est un serveur et un streamer de collection de musique en ligne open source. Il vous donne la liberté d'écouter votre playlist à partir de n'importe quel navigateur ou appareil mobile. Navidrome est un serveur et un streamer de collection de musique en ligne open source. Il vous donne la liberté d'écouter votre playlist à partir de n'importe quel navigateur ou appareil mobile.
**Version incluse :** 0.40.0 **Version incluse :** 0.41.0
## Captures d'écran ## Captures d'écran
@ -36,7 +36,7 @@ Vous devez activer *site public* si vous souhaitez connecter un lecteur client
## Documentation ## Documentation
* Documentation officielle : https://www.navidrome.org/docs/ * Documentation officielle : https://www.navidrome.org/docs/
* Documentation YunoHost : https://yunohost.org/#/app_navidrome_fr * Documentation YunoHost : https://yunohost.org/fr/app_navidrome
## Caractéristiques spécifiques YunoHost ## Caractéristiques spécifiques YunoHost

View file

@ -12,10 +12,14 @@
setup_private=1 setup_private=1
setup_public=1 setup_public=1
upgrade=1 upgrade=1
upgrade=1 from_commit=e41c919ddb65673ea6b452e138d36c240be3b6b7
backup_restore=1 backup_restore=1
multi_instance=0 multi_instance=0
port_already_use=1
change_url=1 change_url=1
;;; Options ;;; Options
Email= Email=
Notification=none Notification=none
;;; Upgrade options
; commit=e41c919ddb65673ea6b452e138d36c240be3b6b7
name=Testing (#43)
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666&

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.40.0/navidrome_0.40.0_Linux_arm64.tar.gz SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.41.0/navidrome_0.41.0_Linux_arm64.tar.gz
SOURCE_SUM=136505badfd5ffff5b54a1a6c4188625b63d9b72bcd35fe1612f0c669762e7c7 SOURCE_SUM=8d7a3a236d842e38c41a672a9699cde0a86408d821c570dc4b2daa0684394a85
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.40.0/navidrome_0.40.0_Linux_armv5.tar.gz SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.41.0/navidrome_0.41.0_Linux_armv5.tar.gz
SOURCE_SUM=b14ffc330eb9f93ca4abc75b1758ef88e62dd7fd878c917abe9c3c496d5737d6 SOURCE_SUM=15d4017d10db7c85ae6dae006f36d329e58eebd38a663725c0f8b92f197c57d1
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.40.0/navidrome_0.40.0_Linux_armv6.tar.gz SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.41.0/navidrome_0.41.0_Linux_armv6.tar.gz
SOURCE_SUM=83ee2aeff3a52823aca91755c9aac92d8988e85c31203d9da869df3362c70b2f SOURCE_SUM=8ef6998631e7684456898d3d46fba56d5e85c15ec390fdb06cf5c60ddb058e93
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.40.0/navidrome_0.40.0_Linux_armv7.tar.gz SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.41.0/navidrome_0.41.0_Linux_armv7.tar.gz
SOURCE_SUM=fbc8f319bea31fa8280f2a7275cb1f44a85baaab0623ced203d323acaaaa58c3 SOURCE_SUM=39e6bfe97934b95477042e9a287139507ebf48c7dbdb79df1038785a852dd8c4
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.40.0/navidrome_0.40.0_Linux_i386.tar.gz SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.41.0/navidrome_0.41.0_Linux_i386.tar.gz
SOURCE_SUM=6f8389326e2699c4ec22fb7430d64bc301a4bceba98e09ecc8e19a378411ffaf SOURCE_SUM=13317bd9779a847bd49bef23b8640dd3594ff89c447024552e076c9c4424e5fd
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false

View file

@ -10,7 +10,7 @@ WantedBy=multi-user.target
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
Type=simple Type=simple
ExecStart=__FINAL_PATH__/__APP__ --configfile "__CONFIG_PATH__/navidrome.toml" ExecStart=__FINALPATH__/__APP__ --configfile "__CONFIG_PATH__/navidrome.toml"
WorkingDirectory=__CONFIG_PATH__ WorkingDirectory=__CONFIG_PATH__
TimeoutStopSec=20 TimeoutStopSec=20
KillMode=process KillMode=process

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.40.0/navidrome_0.40.0_Linux_x86_64.tar.gz SOURCE_URL=https://github.com/deluan/navidrome/releases/download/v0.41.0/navidrome_0.41.0_Linux_x86_64.tar.gz
SOURCE_SUM=b01213087ca38b9e4e9e8a4d94308dca949ffe3f0b2ad6ab4863d8cf97d0672b SOURCE_SUM=9b6f5376b5d64ce929c1d5ca655d6b52d7fe30339c93e312ccee6cc5bea5b9c2
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false

View file

@ -6,14 +6,14 @@
"en": "Modern Music Server and Streamer compatible with Subsonic/Airsonic", "en": "Modern Music Server and Streamer compatible with Subsonic/Airsonic",
"fr": "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic" "fr": "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic"
}, },
"version": "0.40.0~ynh1", "version": "0.41.0~ynh1",
"url": "https://github.com/deluan/navidrome/", "url": "https://github.com/deluan/navidrome/",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"maintainer": { "maintainer": {
"name": "eric_G" "name": "eric_G"
}, },
"requirements": { "requirements": {
"yunohost": ">= 3.8.1" "yunohost": ">= 4.1.7"
}, },
"multi_instance": false, "multi_instance": false,
"services": [ "services": [
@ -24,29 +24,17 @@
{ {
"name": "domain", "name": "domain",
"type": "domain", "type": "domain",
"ask": {
"en": "Choose a domain name for Navidrome",
"fr": "Choisissez un nom de domaine pour Navidrome"
},
"example": "domain.org" "example": "domain.org"
}, },
{ {
"name": "path", "name": "path",
"type": "path", "type": "path",
"ask": {
"en": "Choose a path for Navidrome",
"fr": "Choisissez un chemin pour Navidrome"
},
"example": "/navidrome", "example": "/navidrome",
"default": "/navidrome" "default": "/navidrome"
}, },
{ {
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",
"ask": {
"en": "Is it a public site?",
"fr": "Est-ce un site public ?"
},
"help": { "help": {
"en": "You must activate public site if you want to connect a client player to Navidrome. This can be changed later via the webadmin.", "en": "You must activate public site if you want to connect a client player to Navidrome. This can be changed later via the webadmin.",
"fr": "Vous devez activer site public si vous souhaitez connecter un lecteur client à Navidrome. Vous pourrez changer ceci plus tard via la webadmin." "fr": "Vous devez activer site public si vous souhaitez connecter un lecteur client à Navidrome. Vous pourrez changer ceci plus tard via la webadmin."

View file

@ -46,9 +46,8 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#================================================= #=================================================
ynh_script_progression --message="Storing installation settings..." --weight=2 ynh_script_progression --message="Storing installation settings..." --weight=2
ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS
@ -109,24 +108,15 @@ ynh_script_progression --message="Modifying a config file..." --weight=1
config_path="/var/lib/$app" config_path="/var/lib/$app"
mkdir -p "$config_path" mkdir -p "$config_path"
cp ../conf/navidrome.toml "$config_path/navidrome.toml"
# Main config File # Main config File
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config_path/navidrome.toml" ynh_add_config --template="../conf/navidrome.toml" --destination="$config_path/navidrome.toml"
ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$config_path/navidrome.toml"
ynh_replace_string --match_string="__CONFIG_PATH__" --replace_string="$config_path" --target_file="$config_path/navidrome.toml"
ynh_store_file_checksum --file="$config_path/navidrome.toml"
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1 ynh_script_progression --message="Configuring a systemd service..." --weight=1
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service"
ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="../conf/systemd.service"
ynh_replace_string --match_string="__CONFIG_PATH__" --replace_string="$config_path" --target_file="../conf/systemd.service" ynh_replace_string --match_string="__CONFIG_PATH__" --replace_string="$config_path" --target_file="../conf/systemd.service"
ynh_add_systemd_config ynh_add_systemd_config
#================================================= #=================================================
@ -137,8 +127,10 @@ ynh_add_systemd_config
ynh_script_progression --message="Securing files and directories..." --weight=1 ynh_script_progression --message="Securing files and directories..." --weight=1
# Set permissions to app files # Set permissions to app files
chown -R $app: "$final_path" chown -R $app:$app "$final_path"
chown -R $app: "$config_path" chmod -R o-rwx "$final_path"
chown -R $app:$app "$config_path"
chmod 600 "/var/lib/$app/navidrome.toml"
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST

View file

@ -49,6 +49,14 @@ ynh_script_progression --message="Restoring the NGINX configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path
#================================================= #=================================================
# RESTORE THE APP MAIN DIR # RESTORE THE APP MAIN DIR
#================================================= #=================================================
@ -63,22 +71,16 @@ ynh_script_progression --message="Restoring Navidrome config directory..." --wei
ynh_restore_file --origin_path="/var/lib/$app" ynh_restore_file --origin_path="/var/lib/$app"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app
#================================================= #=================================================
# RESTORE USER RIGHTS # RESTORE USER RIGHTS
#================================================= #=================================================
ynh_script_progression --message="Restoring user rights..." ynh_script_progression --message="Restoring user rights..."
# Restore permissions on app files # Restore permissions on app files
chown -R $app: "$final_path" chown -R $app:$app "$final_path"
chown -R $app: "/var/lib/$app" chmod -R o-rwx "$final_path"
chown -R $app:$app "/var/lib/$app"
chmod 600 "/var/lib/$app/navidrome.toml"
#================================================= #=================================================
# SPECIFIC RESTORATION # SPECIFIC RESTORATION

View file

@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain) domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path) path_url=$(ynh_app_setting_get --app=$app --key=path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port) port=$(ynh_app_setting_get --app=$app --key=port)
architecture=$(ynh_detect_arch) architecture=$(ynh_detect_arch)
@ -65,6 +64,14 @@ ynh_script_progression --message="Stopping a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action=stop --log_path=systemd ynh_systemd_action --service_name=$app --action=stop --log_path=systemd
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir=$final_path
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
@ -106,14 +113,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=8
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
# Create a dedicated user (if not existing)
ynh_system_user_create --username=$app
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
#================================================= #=================================================
@ -121,11 +120,10 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=2
config_path="/var/lib/$app" config_path="/var/lib/$app"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service" ynh_add_config --template="../conf/navidrome.toml" --destination="$config_path/navidrome.toml"
ynh_replace_string --match_string="__FINAL_PATH__" --replace_string="$final_path" --target_file="../conf/systemd.service"
ynh_replace_string --match_string="__CONFIG_PATH__" --replace_string="$config_path" --target_file="../conf/systemd.service"
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_replace_string --match_string="__CONFIG_PATH__" --replace_string="$config_path" --target_file="../conf/systemd.service"
ynh_add_systemd_config ynh_add_systemd_config
#================================================= #=================================================
@ -136,8 +134,10 @@ ynh_add_systemd_config
ynh_script_progression --message="Securing files and directories..." ynh_script_progression --message="Securing files and directories..."
# Set permissions on app files # Set permissions on app files
chown -R $app: $final_path chown -R $app:$app "$final_path"
chown -R $app: $config_path chmod -R o-rwx "$final_path"
chown -R $app:$app "$config_path"
chmod 600 "/var/lib/$app/navidrome.toml"
#================================================= #=================================================
# INTEGRATE SERVICE IN YUNOHOST # INTEGRATE SERVICE IN YUNOHOST
@ -151,7 +151,7 @@ yunohost service add $app --description "Web-based music collection server and s
#================================================= #=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Version:" ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Version:"
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX