diff --git a/scripts/change_url b/scripts/change_url index 740c329..c559e20 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -32,12 +32,7 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Updating a configuration file..." -path=$new_path -domain=$new_domain -ynh_add_config --template="../conf/headphones.ini" --destination="/etc/$app/headphones.ini" - -chmod 600 "/etc/$app/headphones.ini" -chown $app:$app "/etc/$app/headphones.ini" +ynh_replace_string --match_string="^http_root = .*" --replace_string="http_root = $new_path" --target_file="/etc/$app/headphones.ini" #================================================= # GENERIC FINALISATION diff --git a/scripts/upgrade b/scripts/upgrade index f7a3043..9e4b0df 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,17 +58,6 @@ ynh_script_progression --message="Installing Python dependencies..." ynh_secure_remove --file="$install_dir/venv" python3 -m venv $install_dir/venv -#================================================= -# UPDATE A CONFIG FILE -#================================================= -ynh_script_progression --message="Updating a configuration file..." - -mkdir -p "/etc/$app" -ynh_add_config --template="../conf/headphones.ini" --destination="/etc/$app/headphones.ini" - -chmod 600 "/etc/$app/headphones.ini" -chown $app:$app "/etc/$app/headphones.ini" - #================================================= # SETUP SYSTEMD #=================================================