From 698fa28c2af2c03e71d7c0462ea2bfc09966ef4d Mon Sep 17 00:00:00 2001 From: Dante Date: Wed, 24 May 2023 21:04:29 +0100 Subject: [PATCH] Fix config file format, install script and updater.sh old values --- .github/workflows/updater.sh | 8 ++------ conf/config.yaml | 13 +++++-------- scripts/install | 4 +++- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index de8f362..029c141 100755 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -148,12 +148,8 @@ yq -i '.bridge.encryption.require = "__ENCRYPTION_REQUIRE__"' $configFilePath yq -i 'with(.bridge.permissions ; . = { "__LISTRELAY__": "relay", "__LISTUSER__": "user", "__LISTADMIN__": "admin" } | ... style="double")' $configFilePath yq -i '.bridge.relay.enabled = "__ENABLE_RELAYBOT__"' $configFilePath yq -i '.bridge.relay.admin_only = "__ADMIN_ONLY__"' $configFilePath -yq -i '.logging.directory = "/var/log/__APP__"' $configFilePath -yq -i '.logging.print_level = "__PRINT_LEVEL__"' $configFilePath - -## Keep some default options turned off -yq -i '.logging.file_name_format = "null"' $configFilePath - +yq -i '.logging.writers.filename = "/var/log/__APP__"' $configFilePath +yq -i '.logging.min_level = "__PRINT_LEVEL__"' $configFilePath #================================================= # GENERIC FINALIZATION diff --git a/conf/config.yaml b/conf/config.yaml index 7bd9690..7775087 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -414,9 +414,9 @@ bridge: # domain - All users on that homeserver # mxid - Specific user permissions: - "__LISTRELAY__": "relay" - "__LISTUSER__": "user" - "__LISTADMIN__": "admin" + "__LISTRELAY__": relay + "__LISTUSER__": user + "__LISTADMIN__": admin # Settings for relay mode relay: # Whether relay mode should be allowed. If allowed, `!wa set-relay` can be used to turn any @@ -436,16 +436,13 @@ bridge: m.location: "{{ .Sender.Displayname }} sent a location" # Logging config. See https://github.com/tulir/zeroconfig for details. logging: - min_level: debug + min_level: __PRINT_LEVEL__ writers: - type: stdout format: pretty-colored - type: file format: json - filename: ./logs/mautrix-whatsapp.log + filename: /var/log/__APP__ max_size: 100 max_backups: 10 compress: true - directory: /var/log/__APP__ - print_level: __PRINT_LEVEL__ - file_name_format: "null" diff --git a/scripts/install b/scripts/install index 951125a..264a3ea 100755 --- a/scripts/install +++ b/scripts/install @@ -183,8 +183,10 @@ ynh_add_config --template="../conf/config.yaml" --destination="$final_path/confi chmod 400 "$final_path/config.yaml" chown $app:$app "$final_path/config.yaml" -# This call allows to set multiple users during install question "botusers" specifying them separated by a comma +# This calls allows to set multiple users during install question "botusers" specifying them separated by a comma set__listuser +set__listrelay +set__listadmin #================================================= # REGISTER SYNAPSE APP-SERVICE