mirror of
https://github.com/safing/portmaster
synced 2025-09-02 18:49:14 +00:00
Fix updates config handling
This commit is contained in:
parent
5209a090c4
commit
d89b612e3d
1 changed files with 8 additions and 4 deletions
|
@ -61,9 +61,13 @@ func registerConfig() error {
|
||||||
|
|
||||||
func initConfig() {
|
func initConfig() {
|
||||||
releaseChannel = config.GetAsString(releaseChannelKey, releaseChannelStable)
|
releaseChannel = config.GetAsString(releaseChannelKey, releaseChannelStable)
|
||||||
disableUpdates = config.GetAsBool(disableUpdatesKey, false)
|
previousReleaseChannel = releaseChannel()
|
||||||
|
|
||||||
devMode = config.GetAsBool("core/devMode", false)
|
disableUpdates = config.GetAsBool(disableUpdatesKey, false)
|
||||||
|
updatesCurrentlyDisabled = disableUpdates()
|
||||||
|
|
||||||
|
devMode = config.GetAsBool(cfgDevModeKey, false)
|
||||||
|
previousDevMode = devMode()
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateRegistryConfig(_ context.Context, _ interface{}) error {
|
func updateRegistryConfig(_ context.Context, _ interface{}) error {
|
||||||
|
@ -96,8 +100,8 @@ func updateRegistryConfig(_ context.Context, _ interface{}) error {
|
||||||
module.Resolve(updateFailed)
|
module.Resolve(updateFailed)
|
||||||
_ = TriggerUpdate()
|
_ = TriggerUpdate()
|
||||||
log.Infof("updates: automatic updates enabled again.")
|
log.Infof("updates: automatic updates enabled again.")
|
||||||
} else {
|
} else if updatesCurrentlyDisabled {
|
||||||
module.Warning(updateFailed, "Updates are disabled!")
|
module.Warning(updateFailed, "Automatic updates are disabled! This also affects security updates and threat intelligence.")
|
||||||
log.Warningf("updates: automatic updates are now disabled.")
|
log.Warningf("updates: automatic updates are now disabled.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue