fix: ensure the vector container does not exit when no configured sinks are in place

This commit is contained in:
Jose Diaz-Gonzalez
2021-01-04 01:12:25 -05:00
parent 43d6a2ad94
commit 94696e81fa
3 changed files with 27 additions and 6 deletions

View File

@@ -104,6 +104,11 @@ func CommandVectorLogs() error {
func CommandVectorStart(vectorImage string) error {
common.LogInfo2("Starting vector container")
if !common.ContainerExists(vectorContainerName) {
common.LogVerbose("Ensuring vector configuration exists")
if err := writeVectorConfig(); err != nil {
return err
}
return startVectorContainer(vectorImage)
}