[#1764] neofs-node: Allow to check configuration

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
support/v0.34
Evgenii Stratonikov 2022-09-20 16:29:09 +03:00 committed by fyrchik
parent 0fb5c51ac9
commit 59de20fbba
2 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,7 @@ Changelog for NeoFS Node
- Changelog updates CI step (#1808)
- Validate storage node configuration before node startup (#1805)
- `neofs-node -check` command to check the configuration file (#1805)
### Changed

View File

@ -37,6 +37,7 @@ func fatalOnErrDetails(details string, err error) {
func main() {
configFile := flag.String("config", "", "path to config")
versionFlag := flag.Bool("version", false, "neofs node version")
dryRunFlag := flag.Bool("check", false, "validate configuration and exit")
flag.Parse()
if *versionFlag {
@ -50,6 +51,10 @@ func main() {
err := validateConfig(appCfg)
fatalOnErr(err)
if *dryRunFlag {
return
}
c := initCfg(appCfg)
initApp(c)