From 4d1adac8c440ad22533afbecfb4d177006828326 Mon Sep 17 00:00:00 2001 From: Jacky Date: Sun, 6 Oct 2024 22:31:15 +0800 Subject: [PATCH] enhance: do not save settings from env to app.ini #594 --- settings/logrotate.go | 12 ++++++------ settings/settings.go | 5 ----- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/settings/logrotate.go b/settings/logrotate.go index b3f8cc4e..4390b154 100644 --- a/settings/logrotate.go +++ b/settings/logrotate.go @@ -1,13 +1,13 @@ package settings type Logrotate struct { - Enabled bool `json:"enabled"` - CMD string `json:"cmd" protected:"true"` - Interval int `json:"interval"` + Enabled bool `json:"enabled"` + CMD string `json:"cmd" protected:"true"` + Interval int `json:"interval"` } var LogrotateSettings = Logrotate{ - Enabled: false, - CMD: "logrotate /etc/logrotate.d/nginx", - Interval: 1440, // 24 hours + Enabled: false, + CMD: "logrotate /etc/logrotate.d/nginx", + Interval: 1440, // 24 hours } diff --git a/settings/settings.go b/settings/settings.go index d59d5915..cf9aa264 100644 --- a/settings/settings.go +++ b/settings/settings.go @@ -82,11 +82,6 @@ func Setup() { if AuthSettings.MaxAttempts <= 0 { AuthSettings.MaxAttempts = 10 } - - err = Save() - if err != nil { - log.Fatalf("settings.Setup: %v\n", err) - } } func MapTo() {