fix: 引导数据重置等待3s停止服务覆盖数据库
This commit is contained in:
@@ -159,7 +159,8 @@ func Reset() error {
|
||||
if runtime.GOOS == "windows" {
|
||||
// return fmt.Errorf("not support window")
|
||||
} else {
|
||||
if _, err := cmd.ExecWithCheck("sudo", "/usr/local/omc/bin/setomc.sh", "-m", "install"); err != nil {
|
||||
cmdStr := "sudo /usr/local/omc/bin/omcsvc.sh stop && sudo /usr/local/omc/bin/setomc.sh -m install"
|
||||
if _, err := cmd.Execf("nohup sh -c \"sleep 3s && %s\" > /dev/null 2>&1 &", cmdStr); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user