1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/headphones_ynh.git synced 2024-09-03 19:26:02 +02:00
This commit is contained in:
Éric Gaspar 2023-05-25 21:40:06 +02:00
parent 3886bc15de
commit baafb28791
2 changed files with 10 additions and 7 deletions

View file

@ -47,6 +47,12 @@ ynh_backup --src_path="/etc/logrotate.d/$app"
ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================
# BACKUP VARIOUS FILES
#=================================================
ynh_backup --src_path="/etc/$app/"
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -63,14 +63,11 @@ python3 -m venv $install_dir/venv
#=================================================
ynh_script_progression --message="Updating a configuration file..."
if [ -z "/etc/$app/headphones.ini" ]; then
mv /etc/$app/headphones.ini $data_dir/headphones.ini
#else
ynh_add_config --template="../conf/headphones.ini" --destination="$data_dir/headphones.ini"
fi
mkdir -p "/etc/$app"
ynh_add_config --template="../conf/headphones.ini" --destination="/etc/$app/headphones.ini"
chmod 600 "$data_dir/headphones.ini"
chown $app:$app "$data_dir/headphones.ini"
chmod 600 "/etc/$app/headphones.ini"
chown $app:$app "/etc/$app/headphones.ini"
#=================================================
# SETUP SYSTEMD