From 601864131ec7d87aec18e73ce326ea58cbb0d450 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 4 Mar 2022 11:04:38 +0200 Subject: [PATCH] Disable file logging in Docker by default To enable it, use a custom path that points at a writable volume --- docker-run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docker-run.sh b/docker-run.sh index 14f9f78..9ebb99e 100755 --- a/docker-run.sh +++ b/docker-run.sh @@ -7,6 +7,11 @@ fi # Define functions. function fixperms { chown -R $UID:$GID /data + + # /opt/mautrix-whatsapp is read-only, so disable file logging if it's pointing there. + if [[ "$(yq e '.logging.directory' /data/config.yaml)" == "./logs" ]]; then + yq -I4 e -i '.logging.file_name_format = ""' /data/config.yaml + fi } if [[ ! -f /data/config.yaml ]]; then @@ -22,7 +27,7 @@ if [[ ! -f /data/registration.yaml ]]; then /usr/bin/mautrix-whatsapp -g -c /data/config.yaml -r /data/registration.yaml echo "Didn't find a registration file." echo "Generated one for you." - echo "Copy that over to synapses app service directory." + echo "See https://docs.mau.fi/bridges/general/registering-appservices.html on how to use it." exit fi