From f7691177ed4debc45866651ab37cd78bd30ac7fd Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 22 Aug 2021 14:30:50 +0200 Subject: [PATCH] Update restore --- scripts/restore | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/restore b/scripts/restore index f86cd16..ea42491 100755 --- a/scripts/restore +++ b/scripts/restore @@ -142,6 +142,18 @@ systemctl enable $app-iframely.service --quiet ynh_restore_file --origin_path="/etc/systemd/system/$app-pict-rs.service" systemctl enable $app-pict-rs.service --quiet +#================================================= +# RESTORE THE LOGROTATE CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the logrotate configuration..." + +mkdir -p "/var/log/$app" +chmod 750 "/var/log/$app" +chmod -R o-rwx "/var/log/$app" +chown -R $app:$app "/var/log/$app" + +ynh_restore_file --origin_path="/etc/logrotate.d/$app" + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= @@ -162,18 +174,6 @@ ynh_systemd_action --service_name=$app-ui --action="start" --line_match="Started ynh_systemd_action --service_name=$app-iframely --action="start" --line_match="Started" --log_path=systemd ynh_systemd_action --service_name=$app-pict-rs --action="start" --line_match="Started" --log_path=systemd -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the logrotate configuration..." - -mkdir -p "/var/log/$app" -chmod 750 "/var/log/$app" -chmod -R o-rwx "/var/log/$app" -chown -R $app:$app "/var/log/$app" - -ynh_restore_file --origin_path="/etc/logrotate.d/$app" - #================================================= # GENERIC FINALIZATION #=================================================