1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00

Merge pull request #150 from xoddark/set_chown_log_path

set app as owner of log folder in install/restore/update script
This commit is contained in:
Clément 2022-11-01 20:56:18 +01:00 committed by GitHub
commit 4181b0bf8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View file

@ -145,7 +145,9 @@ chmod 644 "/etc/cron.d/$app"
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
mkdir -p "/var/log/$app"
log_path="/var/log/$app"
mkdir -p $log_path
chown $app:www-data $log_path
# Use logrotate to manage application logfile(s)
ynh_use_logrotate

View file

@ -108,7 +108,9 @@ ynh_restore_file --origin_path="/etc/cron.d/$app"
#=================================================
ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
mkdir -p "/var/log/$app"
log_path="/var/log/$app"
mkdir -p $log_path
chown $app:www-data $log_path
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================

View file

@ -167,7 +167,9 @@ fi
#=================================================
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
mkdir -p "/var/log/$app"
log_path="/var/log/$app"
mkdir -p $log_path
chown $app:www-data "$log_path"
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append