fix: ...
This commit is contained in:
@@ -861,7 +861,7 @@ func PostNeServiceAction(w http.ResponseWriter, r *http.Request) {
|
|||||||
case "omc":
|
case "omc":
|
||||||
// send 204 to fe firstly
|
// send 204 to fe firstly
|
||||||
services.ResponseStatusOK204NoContent(w)
|
services.ResponseStatusOK204NoContent(w)
|
||||||
//actionCmd := fmt.Sprintf("sudo %s/bin/omcsvc.sh %s", config.GetYamlConfig().NE.OmcDir, action)
|
//actionCmd := fmt.Sprintf("sudo %s/bin/psapsvc.sh %s", config.GetYamlConfig().NE.OmcDir, action)
|
||||||
actionCmd := fmt.Sprintf("sudo systemctl %s restagent", action)
|
actionCmd := fmt.Sprintf("sudo systemctl %s restagent", action)
|
||||||
go RunSSHCmd(sshHost, actionCmd)
|
go RunSSHCmd(sshHost, actionCmd)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -794,7 +794,7 @@ func ActiveSoftwareToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
// }
|
// }
|
||||||
switch neTypeLower {
|
switch neTypeLower {
|
||||||
case "omc":
|
case "omc":
|
||||||
restartCmd := fmt.Sprintf("sudo %s/bin/omcsvc.sh restart", config.GetYamlConfig().NE.OmcDir)
|
restartCmd := fmt.Sprintf("sudo %s/bin/psapsvc.sh restart", config.GetYamlConfig().NE.OmcDir)
|
||||||
cmd := exec.Command("ssh", sshHost, restartCmd)
|
cmd := exec.Command("ssh", sshHost, restartCmd)
|
||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
log.Tracef("Exec output: %v", string(out))
|
log.Tracef("Exec output: %v", string(out))
|
||||||
@@ -997,7 +997,7 @@ func RollBackSoftwareToNF(w http.ResponseWriter, r *http.Request) {
|
|||||||
// }
|
// }
|
||||||
switch neTypeLower {
|
switch neTypeLower {
|
||||||
case "omc":
|
case "omc":
|
||||||
restartCmd := fmt.Sprintf("sudo %s/bin/omcsvc.sh restart", config.GetYamlConfig().NE.OmcDir)
|
restartCmd := fmt.Sprintf("sudo %s/bin/psapsvc.sh restart", config.GetYamlConfig().NE.OmcDir)
|
||||||
cmd := exec.Command("ssh", sshHost, restartCmd)
|
cmd := exec.Command("ssh", sshHost, restartCmd)
|
||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
log.Tracef("Exec output: %v", string(out))
|
log.Tracef("Exec output: %v", string(out))
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ case "${extension}" in
|
|||||||
EOF
|
EOF
|
||||||
if [ ${neType} == "OMC" ]; then
|
if [ ${neType} == "OMC" ]; then
|
||||||
${omcBin}/setomc.sh -m upgrade >> ${logFile}
|
${omcBin}/setomc.sh -m upgrade >> ${logFile}
|
||||||
${omcBin}/omcsvc.sh restart >> ${logFile}
|
${omcBin}/psapsvc.sh restart >> ${logFile}
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
rpm)
|
rpm)
|
||||||
@@ -43,7 +43,7 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
if [ ${neType} == "OMC" ]; then
|
if [ ${neType} == "OMC" ]; then
|
||||||
${omcBin}/setomc.sh -m upgrade >> ${logFile}
|
${omcBin}/setomc.sh -m upgrade >> ${logFile}
|
||||||
${omcBin}/omcsvc.sh restart >> ${logFile}
|
${omcBin}/psapsvc.sh restart >> ${logFile}
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ case "${extension}" in
|
|||||||
EOF
|
EOF
|
||||||
if [ ${neType} == "OMC" ]; then
|
if [ ${neType} == "OMC" ]; then
|
||||||
${omcBin}/setomc.sh -m upgrade >> ${logFile}
|
${omcBin}/setomc.sh -m upgrade >> ${logFile}
|
||||||
${omcBin}/omcsvc.sh restart >> ${logFile}
|
${omcBin}/psapsvc.sh restart >> ${logFile}
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
rpm)
|
rpm)
|
||||||
@@ -43,7 +43,7 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
if [ ${neType} == "OMC" ]; then
|
if [ ${neType} == "OMC" ]; then
|
||||||
${omcBin}/setomc.sh -m upgrade >> ${logFile}
|
${omcBin}/setomc.sh -m upgrade >> ${logFile}
|
||||||
${omcBin}/omcsvc.sh restart >> ${logFile}
|
${omcBin}/psapsvc.sh restart >> ${logFile}
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|||||||
Reference in New Issue
Block a user