mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-11-29 22:08:10 +02:00
keep track of services errors
So we can exit with the correct code if an error happen inside the services goroutines Fixes #143
This commit is contained in:
@@ -34,7 +34,9 @@ Please take a look at the usage below to customize the startup options`,
|
||||
}
|
||||
if err := service.Start(); err == nil {
|
||||
service.Wait()
|
||||
os.Exit(0)
|
||||
if service.Error == nil {
|
||||
os.Exit(0)
|
||||
}
|
||||
}
|
||||
os.Exit(1)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user