diff --git a/type/__matrix_synapse/files/environment.sh b/type/__matrix_synapse/files/environment.sh new file mode 100644 index 0000000..99179be --- /dev/null +++ b/type/__matrix_synapse/files/environment.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +cat << EOF +# Specify environment variables used when running Synapse +SYNAPSE_CACHE_FACTOR=$CACHE_FACTOR +EOF diff --git a/type/__matrix_synapse/files/homeserver.yaml.sh b/type/__matrix_synapse/files/homeserver.yaml.sh new file mode 100755 index 0000000..77be438 --- /dev/null +++ b/type/__matrix_synapse/files/homeserver.yaml.sh @@ -0,0 +1,1785 @@ +#!/bin/sh + +# NOTE: this template has been generated using the +# matrix-synapse-1.5.1-1.fc31.noarch Fedora package for use with CDIST. + +generate_extra_settings () { + for line in $EXTRA_SETTINGS; do + echo "$line" + done +} + +generate_database () { + if [ "$DATABASE_ENGINE" = "sqlite3" ]; then + cat << EOF +database: + # The database engine name + name: "$DATABASE_ENGINE" + # Arguments to pass to the engine + args: + # Path to the database + database: "$DATABASE_NAME" +EOF + else +cat << EOF +database: + # The database engine name + name: "$DATABASE_ENGINE" + # Arguments to pass to the engine + args: + database: "$DATABASE_NAME" + host: "$DATABASE_HOST" + user: "$DATABASE_USER" + password: "$DATABASE_PASSWORD" +EOF + fi +} + +generate_password_providers () { + if [ "$ENABLE_LDAP_AUTH" = "true" ]; then + cat <