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

Do not overwrite the configuration file

This commit is contained in:
tituspijean 2024-06-30 16:47:38 +02:00
parent a2d2327764
commit 606671cb42
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
2 changed files with 1 additions and 17 deletions

View file

@ -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

View file

@ -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
#=================================================