exec updatePatch.sh use setsid
| | |
| | | "webserver/extend/sys" |
| | | "webserver/extend/util" |
| | | "webserver/middlewares/auth" |
| | | "webserver/service" |
| | | |
| | | "basic.com/dbapi.git" |
| | | "github.com/gin-gonic/gin" |
| | |
| | | } |
| | | //2.更新系统 |
| | | var cmd *exec.Cmd |
| | | cmd = exec.Command("/bin/sh","-c",fmt.Sprintf("./updatePatch.sh %s",unZipPath)) |
| | | logger.Debug("called sh updatePatch.sh ", unZipPath) |
| | | updateCmd := fmt.Sprintf("setsid updatePatch.sh %s",unZipPath) |
| | | cmd = exec.Command("/bin/sh","-c", updateCmd) |
| | | logger.Debug("called sh updatePatch.sh,updateCmd:",updateCmd) |
| | | if b, err := cmd.Output(); err != nil { |
| | | logger.Debug("updatePatch err:",err,"result:",string(b)) |
| | | return false |