mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
initprovider: check if the provider is already initialized
exit with code 0 if no initialization is required
This commit is contained in:
@@ -46,6 +46,8 @@ Please take a look at the usage below to customize the options.`,
|
||||
err = dataprovider.InitializeDatabase(providerConf, configDir)
|
||||
if err == nil {
|
||||
logger.DebugToConsole("Data provider successfully initialized")
|
||||
} else if err == dataprovider.ErrNoInitRequired {
|
||||
logger.DebugToConsole("%v", err.Error())
|
||||
} else {
|
||||
logger.WarnToConsole("Unable to initialize data provider: %v", err)
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user