From abd47183d499531b2432de55b8971b7fdf949390 Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Wed, 9 Oct 2024 13:25:31 +0300 Subject: [PATCH] feat: config DDNSDomain and SOAEmail --- internal/config/config.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/internal/config/config.go b/internal/config/config.go index 3f5ce73..5210add 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -16,9 +16,12 @@ var FeluConfig *config type config struct { ServiceName string + DDNSDomain string // API url, where the API is served at (e.g. api.feluddns.tld) APIUrl string + SOAEmail string + // Initial email for the admin user, only used if no admin account (e.g. first boot) InitialAdminEmail string // Initial password for the admin user, only used if no admin account (e.g. first boot) @@ -44,7 +47,11 @@ func InitConfig() { FeluConfig = &config{ ServiceName: util.LoadEnvStr("FELU_SERVICE_NAME", "FeluDDNS"), - APIUrl: util.LoadEnvStr("FELU_API_URL", "MUST_SET"), + // FIXME: panic without this, should do same for many of these + DDNSDomain: util.LoadEnvStr("FELU_DDNS_DOMAIN", "ddns.staging.fuckdns.org"), + APIUrl: util.LoadEnvStr("FELU_API_URL", "MUST_SET"), + + SOAEmail: util.LoadEnvStr("FELU_SOA_EMAIL", "admin.felu.arpa"), InitialAdminEmail: util.LoadEnvStr("FELU_INITIAL_ADMIN_EMAIL", "admin@example.com"), InitialAdminPwd: util.LoadEnvStr("FELU_INITIAL_ADMIN_PWD", "feluadmin"), -- 2.44.1