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

Make sure the log file is owned by shaarli so that php can write to it

This commit is contained in:
Alexandre Aubin 2022-01-03 23:03:34 +01:00
parent 4ace043d3a
commit 9d7b7d3dc1
2 changed files with 2 additions and 0 deletions

View file

@ -103,6 +103,7 @@ ynh_script_progression --message="Configuring log rotation..."
# Use logrotate to manage application logfile(s) # Use logrotate to manage application logfile(s)
touch "$final_path/data/log.txt" touch "$final_path/data/log.txt"
ynh_use_logrotate "$final_path/data/log.txt" ynh_use_logrotate "$final_path/data/log.txt"
chown $app:www-data "$final_path/data/log.txt"
#================================================= #=================================================
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE

View file

@ -135,6 +135,7 @@ then
ynh_secure_remove "$final_path/data/log.txt" ynh_secure_remove "$final_path/data/log.txt"
touch "$final_path/data/log.txt" touch "$final_path/data/log.txt"
fi fi
chown $app:www-data "$final_path/data/log.txt"
ynh_use_logrotate --non-append ynh_use_logrotate --non-append