From c85ffc0aa5f7a76a35c603c23afe46c2fe62d907 Mon Sep 17 00:00:00 2001 From: Thatoo Date: Wed, 30 Aug 2023 00:20:58 +0200 Subject: [PATCH 01/11] Update server_name.conf --- conf/server_name.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/conf/server_name.conf b/conf/server_name.conf index 81c3548..ad38d12 100644 --- a/conf/server_name.conf +++ b/conf/server_name.conf @@ -3,3 +3,12 @@ location /.well-known/matrix/server { add_header Content-Type application/json; add_header Access-Control-Allow-Origin '*'; } +location /.well-known/matrix/client { + return 200 '{ + "m.homeserver": { "base_url": "https://__DOMAIN__" }, + "im.vector.riot.jitsi": {"preferredDomain": "jitsi.riot.im"}, + "im.vector.riot.e2ee": {"default": true } + }'; + add_header Content-Type application/json; + add_header Access-Control-Allow-Origin '*'; +} From fdf7b6874b071fbfb6c097f774162f03e075ea21 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 23 Sep 2023 09:55:49 +0200 Subject: [PATCH 02/11] Update systemd.service --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index f498f84..ca0138e 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Conduit Matrix Server +Description=Conduit: Matrix server After=network.target [Service] From 1f5ec742c673c2d683867d528fd79beaaf076844 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 23 Sep 2023 10:00:02 +0200 Subject: [PATCH 03/11] cleaning --- scripts/change_url | 4 ++-- scripts/install | 4 ---- scripts/restore | 2 +- scripts/upgrade | 4 ++-- tests.toml | 1 + 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index ae914ad..3a9b28d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -32,7 +32,7 @@ ynh_change_url_nginx_config #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index a877838..6a0b0f2 100755 --- a/scripts/install +++ b/scripts/install @@ -13,16 +13,12 @@ source /usr/share/yunohost/helpers # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -#server_name=$YNH_APP_ARG_SERVER_NAME -registration=$YNH_APP_ARG_REGISTRATION federation="true" #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -#ynh_app_setting_set --app=$app --key=server_name --value=$server_name -ynh_app_setting_set --app=$app --key=registration --value=$registration ynh_app_setting_set --app=$app --key=federation --value=$federation #================================================= diff --git a/scripts/restore b/scripts/restore index 6cda2ba..98c7ea1 100755 --- a/scripts/restore +++ b/scripts/restore @@ -44,7 +44,7 @@ yunohost service add $app --description="Chat server powered by Matrix" --log="/ ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 # Typically you only have either $app or php-fpm but not both at the same time... -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index d093cf4..c70288b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,7 +16,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # "REBUILD" THE APP (DEPLOY NEW SOURCES, RERUN NPM BUILD...) @@ -69,7 +69,7 @@ yunohost service add $app --description="Chat server powered by Matrix" --log="/ #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/tests.toml b/tests.toml index 3d56ef7..9d7fc24 100644 --- a/tests.toml +++ b/tests.toml @@ -13,4 +13,5 @@ test_format = 1.0 # ------------------------------- args.server_name = "domain.tld" + args.registration = false \ No newline at end of file From 86a47b53af60db8e631638eb6a6ccd8991ebf522 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sat, 23 Sep 2023 10:47:34 +0200 Subject: [PATCH 04/11] Remove unused port --- manifest.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 01aa247..34fa110 100644 --- a/manifest.toml +++ b/manifest.toml @@ -86,5 +86,3 @@ ram.runtime = "50M" [resources.ports] main.default = 6167 - tls.default = 8448 - tls.exposed = "TCP" From 837e68dac005b47bd32687ed27e253abd0afa33f Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sat, 23 Sep 2023 10:48:16 +0200 Subject: [PATCH 05/11] Hide conduit tile --- manifest.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/manifest.toml b/manifest.toml index 34fa110..b5e7bbd 100644 --- a/manifest.toml +++ b/manifest.toml @@ -70,6 +70,8 @@ ram.runtime = "50M" [resources.permissions] main.url = "/" + main.show_tile = false + server_api.url = "__DOMAIN__/_matrix" server_api.label = "Server access for client apps." server_api.show_tile = false From c632d3d776b3f7573c6e326461f66160320dfdf4 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Sat, 23 Sep 2023 10:51:57 +0200 Subject: [PATCH 06/11] fix config.toml expecting true/false instead of 1/0 --- scripts/_common.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..bee1111 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,12 @@ # COMMON VARIABLES #================================================= +if [ "$registration" -eq 1 ]; then + registration="true" +else + registration="false" +fi + #================================================= # PERSONAL HELPERS #================================================= From f7c71c9c3f9af18baf341f812bece0fc478faeec Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 23 Sep 2023 11:18:27 +0200 Subject: [PATCH 07/11] Update config_panel.toml --- config_panel.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index e22854a..5744d60 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -11,7 +11,7 @@ name = "Conduit configuration" type = "boolean" yes = "true" no = "false" - bind = "allow_registration:/var/www/__APP__/conduit.toml" + bind = "allow_registration:__INSTALL_DIR__/conduit.toml" [main.registration.federation] ask = "Allow Federation" @@ -19,4 +19,4 @@ name = "Conduit configuration" yes = "true" no = "false" help = "Communicate with other homeservers of the Matrix Federation." - bind = "allow_federation:/var/www/__APP__/conduit.toml" + bind = "allow_federation:__INSTALL_DIR__/conduit.toml" From 4a14506e0cb7482b7042f3bd9e88d8ad4f292ded Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 23 Sep 2023 11:37:12 +0200 Subject: [PATCH 08/11] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 6a0b0f2..2c1fe1c 100755 --- a/scripts/install +++ b/scripts/install @@ -74,7 +74,7 @@ chown $app:root "$install_dir/conduit.toml" ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" #================================================= # END OF SCRIPT From 052966c822f9820ce807f201fe7c6ccd5153ce48 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 24 Sep 2023 08:26:18 +0200 Subject: [PATCH 09/11] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index b5e7bbd..57282bb 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Conduit" description.en = "Simple, fast and reliable chat server powered by Matrix" description.fr = "Serveur de chat simple, rapide et fiable alimenté par Matrix" -version = "0.6.0~ynh4" +version = "0.6.0~ynh5" maintainers = ["eric_G"] From fbba7c9ccc10f9bdd8fd92e9aa9d528028201f31 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 24 Sep 2023 06:26:23 +0000 Subject: [PATCH 10/11] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2159597..853786f 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Conduit is a lightweight open-source server implementation of the Matrix Specification with a focus on easy setup and low system requirements. That means you can make your own Conduit setup in just a few minutes. Conduit keeps things simple, it's a single binary with an embedded database and can be much faster than other server implementations in some cases. -**Shipped version:** 0.6.0~ynh4 +**Shipped version:** 0.6.0~ynh5 ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index 7a8f739..07d3d15 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Conduit est une implémentation de serveur open source légère de la spécification Matrix avec un accent sur une configuration facile et des exigences système faibles. Cela signifie que vous pouvez créer votre propre configuration Conduit en quelques minutes seulement. Conduit garde les choses simples, c'est un binaire unique avec une base de données intégrée et peut être beaucoup plus rapide que d'autres implémentations de serveur dans certains cas. -**Version incluse :** 0.6.0~ynh4 +**Version incluse :** 0.6.0~ynh5 ## Documentations et ressources * Site officiel de l’app : From 385b08a3c5b92d9605af46f78570780b1d2a2cec Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Tue, 26 Sep 2023 21:45:36 +0200 Subject: [PATCH 11/11] Update config_panel.toml --- config_panel.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/config_panel.toml b/config_panel.toml index 5744d60..5597a8f 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -2,6 +2,7 @@ version = "1.0" [main] name = "Conduit configuration" +services = ["__APP__"] [main.registration] name = "User registration"