diff --git a/scripts/upgrade b/scripts/upgrade index 3657b11..b2a525e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -102,30 +102,13 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create --username=$app -#================================================= -# MODIFY A CONFIG FILE -#================================================= -# ynh_script_progression --message="Modifying a config file..." - -#config_path="/var/lib/$app" -# mkdir -p "$config_path" - -# ynh_backup_if_checksum_is_different --file="$config_path/navidrome.toml" - -# 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" - #================================================= # SETUP SYSTEMD #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=2 +config_path="/var/lib/$app" + 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"