d
This commit is contained in:
@@ -28,7 +28,7 @@ sshd:
|
|||||||
maxConnNum: 20
|
maxConnNum: 20
|
||||||
timeout: 1800
|
timeout: 1800
|
||||||
session: multiple
|
session: multiple
|
||||||
mmlHome: ./mmlhome
|
mmlHome: /usr/local/omc/mmlhome
|
||||||
|
|
||||||
database:
|
database:
|
||||||
type: mysql
|
type: mysql
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ func UploadSoftwareFile(w http.ResponseWriter, r *http.Request) {
|
|||||||
filePrefix := fileName[:strings.Index(fileName, ".zip")]
|
filePrefix := fileName[:strings.Index(fileName, ".zip")]
|
||||||
filePath := fmt.Sprintf("%s/%s", softwarePath, fileName)
|
filePath := fmt.Sprintf("%s/%s", softwarePath, fileName)
|
||||||
log.Debugf("filePath:%s filePrefix:%s softwarePath:%s", filePath, filePrefix, softwarePath)
|
log.Debugf("filePath:%s filePrefix:%s softwarePath:%s", filePath, filePrefix, softwarePath)
|
||||||
cmd := exec.Command("unzip", "-f", filePath)
|
cmd := exec.Command("unzip", "-o", filePath)
|
||||||
cmd.Dir = softwarePath
|
cmd.Dir = softwarePath
|
||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
log.Debugf("Exec outpout:%s", string(out))
|
log.Debugf("Exec outpout:%s", string(out))
|
||||||
|
|||||||
Reference in New Issue
Block a user