1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/navidrome_ynh.git synced 2024-09-03 19:46:30 +02:00
* Version 2 (#102)

* fix

* fix

* fix

* cleaning

* cleaning

* Update install

* cleaning

* Auto-update README

* Update tests.toml

* fix

* cleaning

* Update change_url

* Update manifest.toml

* Update manifest.toml

* Auto-update README

* Update tests.toml

* Update change_url

* fix

* Revert "fix"

This reverts commit 8e0075eb92.

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
eric_G 2023-11-17 11:16:38 +01:00 committed by GitHub
parent b5e6e49cdb
commit 612f29e168
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 50 additions and 118 deletions

View file

@ -32,7 +32,7 @@ Navidrome indexes all digital music stored in your hard drive and makes it avail
- Transcoding on the fly. Can be set per user/player. Opus encoding is supported - Transcoding on the fly. Can be set per user/player. Opus encoding is supported
**Shipped version:** 0.49.3~ynh2 **Shipped version:** 0.50.0~ynh1
**Demo:** https://demo.navidrome.org/app/#/login **Demo:** https://demo.navidrome.org/app/#/login

View file

@ -31,7 +31,7 @@ Navidrome indexe toute la musique numérique stockée sur votre disque dur et la
- Compatible avec tous les clients subsonique/madsononique/aironique - Compatible avec tous les clients subsonique/madsononique/aironique
- Encodage à la volée. Peut être défini par utilisateur/lecteur. Le codage opus est pris en charge - Encodage à la volée. Peut être défini par utilisateur/lecteur. Le codage opus est pris en charge
**Version incluse :** 0.49.3~ynh2 **Version incluse :** 0.50.0~ynh1
**Démo :** https://demo.navidrome.org/app/#/login **Démo :** https://demo.navidrome.org/app/#/login

View file

@ -1,18 +1,18 @@
[Unit] [Unit]
Description=Navidrome: Music Server and Streamer Description=Navidrome: Music Server and Streamer
After=remote-fs.target network.target After=remote-fs.target network.target
AssertPathExists=__CONFIG_PATH__ AssertPathExists=/var/lib/__APP__
[Service] [Service]
Type=simple Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__CONFIG_PATH__/ WorkingDirectory=/var/lib/__APP__/
ExecStart=__INSTALL_DIR__/__APP__ --configfile "__CONFIG_PATH__/navidrome.toml" ExecStart=__INSTALL_DIR__/__APP__ --configfile "/var/lib/__APP__/navidrome.toml"
TimeoutStopSec=20 TimeoutStopSec=20
KillMode=process KillMode=process
Restart=on-failure Restart=on-failure
ReadWritePaths=__CONFIG_PATH__ ReadWritePaths=/var/lib/__APP__
# Sandboxing options to harden security # Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these # Depending on specificities of your service/app, you may need to tweak these

View file

@ -3,7 +3,3 @@
Your music files are stored by default in your shared [multimedia folder](https://github.com/YunoHost-Apps/yunohost.multimedia) `/home/yunohost.multimedia/share/Music`. This folder is accessible from Nextcloud with *External Storages* enabled. This will allow you to easily upload your music files to the server. Your music files are stored by default in your shared [multimedia folder](https://github.com/YunoHost-Apps/yunohost.multimedia) `/home/yunohost.multimedia/share/Music`. This folder is accessible from Nextcloud with *External Storages* enabled. This will allow you to easily upload your music files to the server.
You can configure an alternative path to you music files by editing the path `MusicFolder = "/home/yunohost.multimedia/share/Music"` in this file `/var/lib/navidrome/navidrome.toml` using the [documentation](https://www.navidrome.org/docs/usage/configuration-options/). Remember to restart Navidrome service if you change your configuration file. You can configure an alternative path to you music files by editing the path `MusicFolder = "/home/yunohost.multimedia/share/Music"` in this file `/var/lib/navidrome/navidrome.toml` using the [documentation](https://www.navidrome.org/docs/usage/configuration-options/). Remember to restart Navidrome service if you change your configuration file.
#### Client player
You must activate *public site* if you want to connect a client player to Navidrome.

View file

@ -3,7 +3,3 @@
Votre musique est a stockée par default dans le [dossier multimédia](https://github.com/YunoHost-Apps/yunohost.multimedia) partagé `/home/yunohost.multimedia/share/Music`. Ce dossier, facilement accessible depuis Nextcloud avec *Stockages externes* activée, vous permettra d'*uploader* facilement vos fichiers de musique sur votre server. Votre musique est a stockée par default dans le [dossier multimédia](https://github.com/YunoHost-Apps/yunohost.multimedia) partagé `/home/yunohost.multimedia/share/Music`. Ce dossier, facilement accessible depuis Nextcloud avec *Stockages externes* activée, vous permettra d'*uploader* facilement vos fichiers de musique sur votre server.
Vous pouvez personnaliser le dossier de stockage de vos fichiers de musique en éditant le fichier de configuration `/var/lib/navidrome/navidrome.toml` et rediriger la variable `MusicFolder = "/home/yunohost.multimedia/share/Music"`. Vous pouvez également changer d'autre réglage en vous aidant de la [documentation](https://www.navidrome.org/docs/usage/configuration-options/). Pensez à redémarrer le service de Navidrome si vous modifiez votre fichier de configuration. Vous pouvez personnaliser le dossier de stockage de vos fichiers de musique en éditant le fichier de configuration `/var/lib/navidrome/navidrome.toml` et rediriger la variable `MusicFolder = "/home/yunohost.multimedia/share/Music"`. Vous pouvez également changer d'autre réglage en vous aidant de la [documentation](https://www.navidrome.org/docs/usage/configuration-options/). Pensez à redémarrer le service de Navidrome si vous modifiez votre fichier de configuration.
#### Utilisation d'un client
Vous devez activer *site public* si vous souhaitez connecter un lecteur client à Navidrome.

1
doc/PRE_INSTALL.md Normal file
View file

@ -0,0 +1 @@
You must activate *visitors* during installation process if you want to connect a client player to Navidrome.

1
doc/PRE_INSTALL_fr.md Normal file
View file

@ -0,0 +1 @@
Vous devez activer à l'installation *visiteurs* si vous souhaitez connecter un joueur client à Navidrome.

View file

@ -5,7 +5,7 @@ name = "Navidrome"
description.en = "Modern Music Server and Streamer compatible with Subsonic/Airsonic" description.en = "Modern Music Server and Streamer compatible with Subsonic/Airsonic"
description.fr = "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic" description.fr = "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic"
version = "0.49.3~ynh2" version = "0.50.0~ynh1"
maintainers = ["eric_G"] maintainers = ["eric_G"]
@ -17,11 +17,14 @@ admindoc = "https://www.navidrome.org/docs"
code = "https://github.com/deluan/navidrome" code = "https://github.com/deluan/navidrome"
[integration] [integration]
yunohost = ">= 11.1.20" yunohost = ">= 11.2"
architectures = ["amd64", "arm64", "armhf"] architectures = ["amd64", "arm64", "armhf"]
multi_instance = false multi_instance = false
ldap = false ldap = false
sso = true sso = true
disk = "50M" disk = "50M"
ram.build = "50M" ram.build = "50M"
ram.runtime = "50M" ram.runtime = "50M"
@ -43,7 +46,7 @@ ram.runtime = "50M"
[install.language] [install.language]
ask.en = "Choose the application language" ask.en = "Choose the application language"
ask.fr = "Choisissez la langue de l'application" ask.fr = "Choisissez la langue de l'application"
type = "string" type = "select"
choices = ["de", "en", "es", "fr", "it", "nl", "pt"] choices = ["de", "en", "es", "fr", "it", "nl", "pt"]
default = "fr" default = "fr"
@ -52,12 +55,12 @@ ram.runtime = "50M"
[resources.sources] [resources.sources]
[resources.sources.main] [resources.sources.main]
amd64.url = "https://github.com/deluan/navidrome/releases/download/v0.49.3/navidrome_0.49.3_Linux_x86_64.tar.gz" amd64.url = "https://github.com/navidrome/navidrome/releases/download/v0.50.0/navidrome_0.50.0_linux_amd64.tar.gz"
amd64.sha256 = "d7646878e34d7c79eab9345c8779637eeac9faf2147f6fda2f4b2d832a76308e" amd64.sha256 = "a4b8760d6e2b1649aa5069b67f5ba1c5554df4259054159ef7aebc4babee5c38"
arm64.url = "https://github.com/deluan/navidrome/releases/download/v0.49.3/navidrome_0.49.3_Linux_arm64.tar.gz" arm64.url = "https://github.com/navidrome/navidrome/releases/download/v0.50.0/navidrome_0.50.0_linux_arm64.tar.gz"
arm64.sha256 = "1c7b31be311d441261fe148e7c8bb81273ac7bf1024388304a8929457eab87a6" arm64.sha256 = "e1f7bbabbae87cb0a5309764f9e52557f76a4947fbb9bac1c46382c1791e0e7b"
armhf.url = "https://github.com/deluan/navidrome/releases/download/v0.49.3/navidrome_0.49.3_Linux_armv7.tar.gz" armhf.url = "https://github.com/navidrome/navidrome/releases/download/v0.50.0/navidrome_0.50.0_linux_armv7.tar.gz"
armhf.sha256 = "c8298754e7abd0461ca014bb939e2f34af1fd88b34e8d8329c50af321b8a155d" armhf.sha256 = "c93b8ec7f46cd717d4f7a0e5f5d4861e8f8342059379a77a2c1fc9d7c16c847e"
in_subdir = false in_subdir = false
[resources.system_user] [resources.system_user]

View file

@ -30,13 +30,12 @@ ynh_change_url_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Modifying a config file..." --weight=1 ynh_script_progression --message="Modifying a config file..." --weight=1
config_path="/var/lib/$app"
path_url="$new_path" path_url="$new_path"
ynh_add_config --template="../conf/navidrome.toml" --destination="$config_path/navidrome.toml" ynh_add_config --template="navidrome.toml" --destination="/var/lib/$app/navidrome.toml"
chmod 600 "$config_path/navidrome.toml" chmod 600 "/var/lib/$app/navidrome.toml"
chown -R $app:$app "$config_path" chown -R $app:$app "/var/lib/$app/navidrome.toml"
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION

View file

@ -19,6 +19,7 @@ enable_animation="true"
enable_transcoding="false" enable_transcoding="false"
welcome_message="" welcome_message=""
enable_sharing="false" enable_sharing="false"
config_path="/var/lib/$app"
#================================================= #=================================================
# STORE SETTINGS FROM MANIFEST # STORE SETTINGS FROM MANIFEST
@ -31,6 +32,7 @@ ynh_app_setting_set --app=$app --key=enable_animation --value=$enable_animation
ynh_app_setting_set --app=$app --key=enable_transcoding --value=$enable_transcoding ynh_app_setting_set --app=$app --key=enable_transcoding --value=$enable_transcoding
ynh_app_setting_set --app=$app --key=welcome_message --value=$welcome_message ynh_app_setting_set --app=$app --key=welcome_message --value=$welcome_message
ynh_app_setting_set --app=$app --key=enable_sharing --value=$enable_sharing ynh_app_setting_set --app=$app --key=enable_sharing --value=$enable_sharing
ynh_app_setting_set --app=$app --key=config_path --value=$config_path
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
@ -40,7 +42,8 @@ ynh_script_progression --message="Setting up source files..." --weight=4
# 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"
chmod 750 "$install_dir" mkdir -p "$config_path"
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir" chown -R $app:$app "$install_dir"
@ -52,6 +55,11 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=3
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Web-based music collection server and streamer" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
#================================================= #=================================================
@ -66,34 +74,12 @@ ynh_multimedia_build_main_dir
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_script_progression --message="Adding a configuration file..." --weight=1
config_path="/var/lib/$app"
ynh_app_setting_set --app=$app --key=config_path --value=$config_path
mkdir -p "$config_path"
# Main config File # Main config File
ynh_add_config --template="../conf/navidrome.toml" --destination="$config_path/navidrome.toml" ynh_add_config --template="navidrome.toml" --destination="$config_path/navidrome.toml"
chmod 600 "$config_path/navidrome.toml" chmod 600 "$config_path/navidrome.toml"
chown -R $app:$app "$config_path" chown -R $app:$app "$config_path"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description="Web-based music collection server and streamer"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================

View file

@ -22,29 +22,12 @@ 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 NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=5
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
#=================================================
# SPECIFIC REMOVE
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression --message="Removing various files..." --weight=6
# Remove the config directory securely # Remove the config directory securely
ynh_secure_remove --file="/var/lib/$app" ynh_secure_remove --file="/var/lib/$app"

View file

@ -17,17 +17,9 @@ 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:$app "$install_dir" chown -R $app:$app "$install_dir"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RESTORE VARIOUS FILES # RESTORE VARIOUS FILES
#================================================= #=================================================
@ -36,7 +28,7 @@ ynh_script_progression --message="Restoring various files..." --weight=2
ynh_restore_file --origin_path="/var/lib/$app" ynh_restore_file --origin_path="/var/lib/$app"
chmod 600 "/var/lib/$app/navidrome.toml" chmod 600 "/var/lib/$app/navidrome.toml"
chown -R $app "/var/lib/$app" chown -R $app:$app "/var/lib/$app"
#================================================= #=================================================
# RESTORE SYSTEMD # RESTORE SYSTEMD
@ -46,12 +38,9 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet systemctl enable $app.service --quiet
#================================================= ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="Web-based music collection server and streamer" yunohost service add $app --description="Web-based music collection server and streamer" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
@ -60,13 +49,6 @@ 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:"
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
#================================================= #=================================================

View file

@ -79,47 +79,32 @@ 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:$app "$install_dir" chown -R $app:$app "$install_dir"
#================================================= #=================================================
# NGINX CONFIGURATION # REAPPLY SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 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
#=================================================
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..."
config_path="/var/lib/$app"
# Uncomment when there is new options added upstream
ynh_add_config --template="../conf/navidrome.toml" --destination="$config_path/navidrome.toml"
chmod 600 "$config_path/navidrome.toml"
chown -R $app:$app "$config_path"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=2
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
#================================================= yunohost service add $app --description="Web-based music collection server and streamer" --log="/var/log/$app/$app.log"
# GENERIC FINALIZATION
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="Web-based music collection server and streamer" #=================================================
# UPDATE A CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=2
# Uncomment when there is new options added upstream
ynh_add_config --template="navidrome.toml" --destination="/var/lib/$app/navidrome.toml"
chmod 600 "/var/lib/$app/navidrome.toml"
chown -R $app:$app "/var/lib/$app"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE

View file

@ -12,4 +12,4 @@ test_format = 1.0
# Commits to test upgrade from # Commits to test upgrade from
# ------------------------------- # -------------------------------
test_upgrade_from.d7eb59fd.name = "Upgrade from 0.47.0~ynh1" test_upgrade_from.67d16cd5c8a3d2e2c44348ec3e8c41af6559e3df.name = "Upgrade from 0.49.2~ynh1"