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:
parent
2326075c45
commit
61897ee722
3 changed files with 9 additions and 8 deletions
|
@ -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
|
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
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -198,10 +198,7 @@ set_permissions
|
||||||
ynh_script_progression --message="Configuring log rotation..." --weight=1
|
ynh_script_progression --message="Configuring log rotation..." --weight=1
|
||||||
|
|
||||||
# Use logrotate to manage application logfiles
|
# Use logrotate to manage application logfiles
|
||||||
ynh_use_logrotate --logfile="/var/log/$app/command_build_similarity_index.log" --specific_user="$app/$app"
|
set_up_logrotate
|
||||||
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"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICES IN YUNOHOST
|
# INTEGRATE SERVICES IN YUNOHOST
|
||||||
|
|
|
@ -167,10 +167,7 @@ set_permissions
|
||||||
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
|
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
|
||||||
|
|
||||||
# Use logrotate to manage application logfiles
|
# Use logrotate to manage application logfiles
|
||||||
ynh_use_logrotate --logfile="/var/log/$app/command_build_similarity_index.log" --specific_user="$app/$app" --non-append
|
set_up_logrotate
|
||||||
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
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INTEGRATE SERVICES IN YUNOHOST
|
# INTEGRATE SERVICES IN YUNOHOST
|
||||||
|
|
Loading…
Add table
Reference in a new issue