feat(updater): UPDATER_VPN_SERVICE_PROVIDERS

- Updater defaults to update the VPN provider in use if enabled
This commit is contained in:
Quentin McGaw
2022-01-26 22:40:57 +00:00
parent bcf9bfa5d3
commit 1e3f878470
4 changed files with 8 additions and 12 deletions

View File

@@ -7,7 +7,6 @@ import (
"time"
"github.com/qdm12/gluetun/internal/configuration/settings"
"github.com/qdm12/gluetun/internal/constants"
)
func readUpdater() (updater settings.Updater, err error) {
@@ -21,13 +20,7 @@ func readUpdater() (updater settings.Updater, err error) {
return updater, err
}
// TODO use current provider being used
for _, provider := range constants.AllProviders() {
if provider == constants.Custom {
continue
}
updater.Providers = append(updater.Providers, provider)
}
updater.Providers = envToCSV("UPDATER_VPN_SERVICE_PROVIDERS")
return updater, nil
}