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

Fix logrotate

This commit is contained in:
Jules Bertholet 2021-05-03 12:55:44 -04:00
parent 2326075c45
commit 61897ee722
3 changed files with 9 additions and 8 deletions

View file

@ -114,6 +114,13 @@ function set_permissions {
setfacl -n -R -m user:www-data:rx -m default:user:www-data:rx $data_path/protected_media $data_path/data $data_path/data/nextcloud_media
}
function set_up_logrotate {
ynh_use_logrotate --logfile="/var/log/$app/command_build_similarity_index.log" --specific_user="$app/$app" --non_append
ynh_use_logrotate --logfile="/var/log/$app/gunicorn_django.log" --specific_user="$app/$app"
ynh_use_logrotate --logfile="/var/log/$app/image_similarity.log" --specific_user="$app/$app"
ynh_use_logrotate --logfile="/var/log/$app/ownphotos.log" --specific_user="$app/$app"
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -198,10 +198,7 @@ set_permissions
ynh_script_progression --message="Configuring log rotation..." --weight=1
# Use logrotate to manage application logfiles
ynh_use_logrotate --logfile="/var/log/$app/command_build_similarity_index.log" --specific_user="$app/$app"
ynh_use_logrotate --logfile="/var/log/$app/gunicorn_django.log" --specific_user="$app/$app"
ynh_use_logrotate --logfile="/var/log/$app/image_similarity.log" --specific_user="$app/$app"
ynh_use_logrotate --logfile="/var/log/$app/ownphotos.log" --specific_user="$app/$app"
set_up_logrotate
#=================================================
# INTEGRATE SERVICES IN YUNOHOST

View file

@ -167,10 +167,7 @@ set_permissions
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
# Use logrotate to manage application logfiles
ynh_use_logrotate --logfile="/var/log/$app/command_build_similarity_index.log" --specific_user="$app/$app" --non-append
ynh_use_logrotate --logfile="/var/log/$app/gunicorn_django.log" --specific_user="$app/$app" --non-append
ynh_use_logrotate --logfile="/var/log/$app/image_similarity.log" --specific_user="$app/$app" --non-append
ynh_use_logrotate --logfile="/var/log/$app/ownphotos.log" --specific_user="$app/$app" --non-append
set_up_logrotate
#=================================================
# INTEGRATE SERVICES IN YUNOHOST