From 67e8ca6714622276efa5c12383142745b6020f85 Mon Sep 17 00:00:00 2001 From: chaptergy Date: Thu, 22 Jul 2021 14:05:21 +0200 Subject: [PATCH] Fixes crash when logrotate fails --- backend/setup.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/setup.js b/backend/setup.js index 44673b37..4d614baf 100644 --- a/backend/setup.js +++ b/backend/setup.js @@ -210,8 +210,10 @@ const setupLogrotation = () => { const intervalTimeout = 1000 * 60 * 60 * 24 * 2; // 2 days const runLogrotate = async () => { - await utils.exec('logrotate /etc/logrotate.d/nginx-proxy-manager'); - logger.info('Logrotate completed.'); + try { + await utils.exec('logrotate /etc/logrotate.d/nginx-proxy-manager'); + logger.info('Logrotate completed.'); + } catch (e) { logger.warn(e); } }; logger.info('Logrotate Timer initialized');