From 26fc41f960ecb67e47bed46e1abf9df827527545 Mon Sep 17 00:00:00 2001 From: petervolvowinz Date: Thu, 29 Feb 2024 09:51:03 +0100 Subject: [PATCH] temp fix for redis server startup fail --- server/vissv2server/serviceMgr/serviceMgr.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/server/vissv2server/serviceMgr/serviceMgr.go b/server/vissv2server/serviceMgr/serviceMgr.go index fe61c3d2..3a4ee658 100644 --- a/server/vissv2server/serviceMgr/serviceMgr.go +++ b/server/vissv2server/serviceMgr/serviceMgr.go @@ -19,6 +19,7 @@ import ( "net" "net/http" "os" + "os/exec" "strconv" "strings" @@ -958,13 +959,14 @@ func ServiceMgrInit(mgrId int, serviceMgrChan chan string, stateStorageType stri utils.Error.Printf("redis-server ,ping err = %s", err) if utils.FileExists("redis.log") { os.Remove("redis.log") - } /* - cmd := exec.Command("/usr/bin/bash", "redisNativeInit.sh") - err := cmd.Run() - if err != nil { - utils.Error.Printf("redis-server startup failed, err=%s", err) - os.Exit(1) - }*/ + } + cmd := exec.Command("/usr/bin/bash", "redisNativeInit.sh") + err := cmd.Run() + if err != nil { + utils.Error.Printf("redis-server startup failed, err=%s", err) + // os.Exit(1) should terminate the process + return + } } else { utils.Info.Printf("Redis state ping is ok") }