mirror of
https://github.com/fosrl/gerbil.git
synced 2026-02-18 10:56:46 +00:00
Better feedback about config
This commit is contained in:
11
main.go
11
main.go
@@ -133,9 +133,14 @@ func main() {
|
|||||||
logger.Fatal("Failed to parse MTU: %v", err)
|
logger.Fatal("Failed to parse MTU: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate that only one config option is provided
|
// are they missing either the config file or the remote config URL?
|
||||||
if (configFile != "" && remoteConfigURL != "") || (configFile == "" && remoteConfigURL == "") {
|
if configFile == "" && remoteConfigURL == "" {
|
||||||
logger.Fatal("Please provide either --config or --remoteConfig, but not both")
|
logger.Fatal("You must provide either a config file or a remote config URL")
|
||||||
|
}
|
||||||
|
|
||||||
|
// do they have both the config file and the remote config URL?
|
||||||
|
if configFile != "" && remoteConfigURL != "" {
|
||||||
|
logger.Fatal("You must provide either a config file or a remote config URL, not both")
|
||||||
}
|
}
|
||||||
|
|
||||||
var key wgtypes.Key
|
var key wgtypes.Key
|
||||||
|
|||||||
Reference in New Issue
Block a user