From 133272d5819d296e015bf69a60fb0d17d1daf9f4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 18 Aug 2020 15:02:00 +0200 Subject: [PATCH] Add config --- scripts/change_url | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 0568b86..9f3e56f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -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 + +path_url="$new_path" +config_path="/var/lib/$app" + +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 #=================================================