1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/navidrome_ynh.git synced 2024-09-03 19:46:30 +02:00

Set DataFolder (#12)

* Set DataFolder path

* change version
This commit is contained in:
Éric Gaspar 2020-08-19 12:03:30 +02:00 committed by GitHub
parent e0b61ebf01
commit 82e715c69c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 2 deletions

View file

@ -15,7 +15,7 @@
backup_restore=1
multi_instance=0
port_already_use=1
change_url=0
change_url=1
;;; Levels
Level 5=auto
;;; Options

View file

@ -4,4 +4,5 @@ Port = "__PORT__"
BaseURL = "__PATH_URL__"
ScanInterval = "90s"
TranscodingCacheSize = "150MiB"
DataFolder = "__CONFIG_PATH__"
MusicFolder = "/home/yunohost.navidrome/Music"

View file

@ -6,7 +6,7 @@
"en": "Modern Music Server and Streamer compatible with Subsonic/Airsonic",
"fr": "Serveur de musique moderne et Streamer compatibles avec Subsonic/Airsonic"
},
"version": "0.30.1~ynh1",
"version": "0.30.1~ynh2",
"url": "https://github.com/deluan/navidrome/",
"license": "AGPL-3.0-only",
"maintainer": {

View file

@ -101,6 +101,23 @@ then
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
fi
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_script_progression --message="Modifying a config file..." --weight=1
config_path="/var/lib/$app"
path_url="$new_path"
cp ../conf/navidrome.toml "$config_path/navidrome.toml"
# Main config File
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$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"
#=================================================
# GENERIC FINALISATION
#=================================================

View file

@ -118,6 +118,7 @@ cp ../conf/navidrome.toml "$config_path/navidrome.toml"
# Main config File
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$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"

View file

@ -115,6 +115,7 @@ cp ../conf/navidrome.toml "$config_path/navidrome.toml"
# Main config File
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$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"