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'); diff --git a/docker/rootfs/etc/cont-init.d/01_perms.sh b/docker/rootfs/etc/cont-init.d/01_perms.sh new file mode 100755 index 00000000..669a0b7c --- /dev/null +++ b/docker/rootfs/etc/cont-init.d/01_perms.sh @@ -0,0 +1,4 @@ +#!/usr/bin/with-contenv bash + +mkdir -p /data/logs +chown -R root:root /data/logs \ No newline at end of file