Browse Source

触发新脚本控制

master
VIVIMAN 3 years ago
parent
commit
d387fddbb1
  1. 18
      golang_learn/data_func/go_to_tray/demo04/main.go

18
golang_learn/data_func/go_to_tray/demo04/main.go

@ -19,7 +19,7 @@ func mkFile() {
err := os.Mkdir("shell", os.ModePerm)
if err == nil {
toFile("./shell/startCX.bat", "net start GWY20_Tomcat")
toFile("./shell/stopCX.bat", "net stop GWY20_Tomcat")
toFile("./shell/stopCX.bat", "taskkill /f /fi \"SERVICES eq GWY20_Tomcat\"")
toFile("./shell/startDB.bat", "net start GWY20_Mysql")
toFile("./shell/stopDB.bat", "net stop GWY20_Mysql")
toFile("./shell/startCX.sh", "service qggwy.service start")
@ -147,13 +147,13 @@ func OpenServe(isDb bool) error {
cmd = "cmd"
args = []string{"/c", "cd", "shell", "&&", "startDB.bat"}
} else {
cmd = "/bin/sh"
args = []string{"-c", "cd", "shell", "&&", "startDB.sh"}
cmd = "cmd"
args = []string{"/c", "cd", "shell", "&&", "startCX.bat"}
}
default: // "linux", "freebsd", "openbsd", "netbsd", "mac"
if isDb {
cmd = "cmd"
args = []string{"/c", "cd", "shell", "&&", "startCX.bat"}
cmd = "/bin/sh"
args = []string{"-c", "cd", "shell", "&&", "startDB.sh"}
} else {
cmd = "/bin/sh"
args = []string{"-c", "cd", "shell", "&&", "startCX.sh"}
@ -175,13 +175,13 @@ func CloseServe(isDb bool) error {
cmd = "cmd"
args = []string{"/c", "cd", "shell", "&&", "stopDB.bat"}
} else {
cmd = "/bin/sh"
args = []string{"-c", "cd", "shell", "&&", "stopDB.sh"}
cmd = "cmd"
args = []string{"/c", "cd", "shell", "&&", "stopCX.bat"}
}
default: // "linux", "freebsd", "openbsd", "netbsd", "mac"
if isDb {
cmd = "cmd"
args = []string{"/c", "cd", "shell", "&&", "stopCX.bat"}
cmd = "/bin/sh"
args = []string{"-c", "cd", "shell", "&&", "stopDB.sh"}
} else {
cmd = "/bin/sh"
args = []string{"-c", "cd", "shell", "&&", "stopCX.sh"}

Loading…
Cancel
Save