From 009a56e2eb2342c335995df99c3e67f585a87c21 Mon Sep 17 00:00:00 2001 From: Nathan Gill Date: Thu, 10 Aug 2023 17:54:07 -0400 Subject: [PATCH] Add default homeserver to Cinny's configuration --- conf/cinny.json | 7 +++++++ manifest.toml | 8 ++++++++ scripts/install | 8 ++++++++ 3 files changed, 23 insertions(+) create mode 100644 conf/cinny.json diff --git a/conf/cinny.json b/conf/cinny.json new file mode 100644 index 0000000..fd4370e --- /dev/null +++ b/conf/cinny.json @@ -0,0 +1,7 @@ +{ + "defaultHomeserver": 0, + "homeserverList": [ + "__DEFAULT_HOME_SERVER__" + ], + "allowCustomHomeservers": true +} diff --git a/manifest.toml b/manifest.toml index df6b1e8..47e6ee5 100644 --- a/manifest.toml +++ b/manifest.toml @@ -36,6 +36,14 @@ ram.runtime = "50M" type = "path" default = "/cinny" + [install.default_home_server] + ask.en = "Choose a default Matrix server for Cinny's login" + ask.fr = "Choisissez un serveur Matrix par défault" + help.en = "If you're running your own homeserver with Synapse, Dendrite, or Conduit you probably want this to be your homeserver's domain." + type = "string" + example = "my-own-homeserver.tld" + default = "matrix.org" + [install.init_main_permission] help.en = "You will usually let visitors access Cinny so that anyone without a Yunohost account can log into Matrix." help.fr = "Vous laisserez généralement les visiteurs accéder Cinny pour s'y connecter sans avoir de compte Yunohost." diff --git a/scripts/install b/scripts/install index edcc0bc..42b97f1 100755 --- a/scripts/install +++ b/scripts/install @@ -28,6 +28,14 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# CINNY CONFIGURATION +#================================================= +ynh_script_progression --message="Configuring Cinny..." --weight=1 + +# Copy over the Cinny configuration file +ynh_add_config --template="../conf/cinny.json" --destination="$install_dir/config.json" + #================================================= # END OF SCRIPT #=================================================