From 4fe29814198498a5bef5223c765a9d0ddecb9c03 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Wed, 1 Oct 2025 10:44:12 -0700 Subject: [PATCH] Fix config parsing --- README.md | 14 ++++++++++---- zooid.service | 1 - zooid/config.go | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1418562..f9785ec 100644 --- a/README.md +++ b/README.md @@ -74,17 +74,23 @@ A special `[roles.member]` heading may be used to configure policies for all rel The below config file might be saved as `./config/my-relay.example.com` in order to route requests from `wss://my-relay.example.com` to this virtual relay. ```toml -[self] -name = "My relay" -schema = 'my_relay' +host = "my-relay.example.com" +schema = "my_relay" secret = "ce30b1831a4551f4cb7a984033c34ab96d8cf56ff50df9d0c27d9fa5422f2278" +[info] +name = "My relay" +icon = "https://example.com/icon.png" +pubkey = "d9254d9898fd4728f7e2b32b87520221a50f6b8b97d935d7da2de8923988aa6d" +description = "A community relay for my friends" + [policy] strip_signatures = false [groups] enabled = true auto_join = false +auto_leave = true [management] enabled = true @@ -123,7 +129,7 @@ echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile su --login zooid # Clone the repository and build -git clone https://github.com/coracle-social/zooid.git ~/zooid && cd zooid +git clone https://github.com/coracle-social/zooid.git ~/zooid && cd ~/zooid CGO_ENABLED=1 go build -o bin/zooid cmd/relay/main.go # Back to root diff --git a/zooid.service b/zooid.service index c73b0c7..c40a91a 100644 --- a/zooid.service +++ b/zooid.service @@ -1,6 +1,5 @@ [Unit] Description=zooid -ConditionPathExists=/home/zooid/zooid After=network.target [Service] diff --git a/zooid/config.go b/zooid/config.go index 9e9c49e..fb4511f 100644 --- a/zooid/config.go +++ b/zooid/config.go @@ -24,7 +24,7 @@ type Config struct { Secret string `toml:"secret"` Pubkey string `toml:"pubkey"` Description string `toml:"description"` - } `toml:"self"` + } `toml:"info"` Policy struct { StripSignatures bool `toml:"strip_signatures"`