From e36fedf4b272af41c83cc5842574d94b777be4fc Mon Sep 17 00:00:00 2001 From: James Read Date: Tue, 4 Jun 2024 19:37:59 +0100 Subject: [PATCH] Check for updates default disabled (#333) * feature: Checking for updates is now disabled by default (#93) * feature: Default config has checkForUpdates: false (it defaults to false anyway) to make people aware of the update checking feature --- config.yaml | 3 +++ internal/config/config.go | 2 +- internal/updatecheck/updateCheck.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.yaml b/config.yaml index 33727ca..058370e 100644 --- a/config.yaml +++ b/config.yaml @@ -9,6 +9,9 @@ listenAddressSingleHTTPFrontend: 0.0.0.0:1337 # Choose from INFO (default), WARN and DEBUG logLevel: "INFO" +# Checking for updates https://docs.olivetin.app/update-checks.html +checkForUpdates: false + # Actions are commands that are executed by OliveTin, and normally show up as # buttons on the WebUI. # diff --git a/internal/config/config.go b/internal/config/config.go index 19d52f2..9a33000 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -163,7 +163,7 @@ func DefaultConfig() *Config { config.ListenAddressPrometheus = "localhost:1341" config.ExternalRestAddress = "." config.LogLevel = "INFO" - config.CheckForUpdates = true + config.CheckForUpdates = false config.DefaultPermissions.Exec = true config.DefaultPermissions.View = true config.DefaultPermissions.Logs = true diff --git a/internal/updatecheck/updateCheck.go b/internal/updatecheck/updateCheck.go index 5bbd468..6073a11 100644 --- a/internal/updatecheck/updateCheck.go +++ b/internal/updatecheck/updateCheck.go @@ -22,7 +22,7 @@ type versionMapType struct { func StartUpdateChecker(cfg *config.Config) { if !cfg.CheckForUpdates { installationinfo.Runtime.AvailableVersion = "none" - log.Warn("Update checking is disabled") + log.Infof("Update checking is disabled") return }