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 #=================================================