From fe2a8f4780f0a743b274352d34635ea7bf2a0915 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 12 Jan 2021 10:15:38 +0000 Subject: [PATCH 1/2] [runit] fix the cycling of logs for the contacts service --- server-ce/runit/contacts-sharelatex/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server-ce/runit/contacts-sharelatex/run b/server-ce/runit/contacts-sharelatex/run index e220d9ac1d..4c01aa0985 100755 --- a/server-ce/runit/contacts-sharelatex/run +++ b/server-ce/runit/contacts-sharelatex/run @@ -7,4 +7,4 @@ if [ "$DEBUG_NODE" == "true" ]; then NODE_PARAMS="--inspect=0.0.0.0:30360" fi -exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/contacts/app.js >> /var/log/sharelatex/contacts 2>&1 +exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /var/www/sharelatex/contacts/app.js >> /var/log/sharelatex/contacts.log 2>&1 From 89fe7ca11a2c71b49d7ec6b6ef8fb2ae42277249 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 12 Jan 2021 10:16:09 +0000 Subject: [PATCH 2/2] [init_scripts] delete old logs of the contacts service --- server-ce/init_scripts/10_delete_old_logs.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 server-ce/init_scripts/10_delete_old_logs.sh diff --git a/server-ce/init_scripts/10_delete_old_logs.sh b/server-ce/init_scripts/10_delete_old_logs.sh new file mode 100755 index 0000000000..1b606dbf92 --- /dev/null +++ b/server-ce/init_scripts/10_delete_old_logs.sh @@ -0,0 +1,7 @@ +#!/bin/sh +set -e + +# Up to version 2.5.0 the logs of the contacts service were written into a +# file that was not picked up by logrotate. +# The service is stable and we can safely discard any logs. +rm -vf /var/log/sharelatex/contacts