enhance: do not save settings from env to app.ini #594

This commit is contained in:
Jacky 2024-10-06 22:31:15 +08:00
parent b64f71e13a
commit 4d1adac8c4
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
2 changed files with 6 additions and 11 deletions

View file

@ -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
}

View file

@ -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() {