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:
commit
4181b0bf8f
3 changed files with 9 additions and 3 deletions
|
@ -145,7 +145,9 @@ chmod 644 "/etc/cron.d/$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring log rotation..." --weight=1
|
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)
|
# Use logrotate to manage application logfile(s)
|
||||||
ynh_use_logrotate
|
ynh_use_logrotate
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,9 @@ ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
|
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"
|
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -167,7 +167,9 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
|
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)
|
# Use logrotate to manage app-specific logfile(s)
|
||||||
ynh_use_logrotate --non-append
|
ynh_use_logrotate --non-append
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue