forked from MirrorHub/mautrix-whatsapp
Disable file logging in Docker by default
To enable it, use a custom path that points at a writable volume
This commit is contained in:
parent
2e01dc4bd4
commit
601864131e
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue