This commit is contained in:
2023-08-20 17:31:57 +08:00
parent dd86a61c26
commit 385cd4b182
3 changed files with 6 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ omc:
dn: 4600
chk2ne: false
sn: 13750650
checksign: false
checksign: true
backup: /usr/local/omc/backup
upload: /usr/local/omc/upload
frontUpload: /usr/local/omc/htdocs/front/upload
@@ -63,6 +63,7 @@ omc:
checkContentType: false
testMode: true
rbacMode: true
runDir: /usr/local/omc/run
# Alarm module setting
# Forward interface:
@@ -91,6 +92,8 @@ auth:
token: true
expires: 1800
session: multiple
publicKey: /usr/local/omc/etc/certs/omc_pub.key
privateKey: /usr/local/omc/etc/certs/omc_pri.key
# Parameter for limit number
# rmuid_maxnum: the max number of rmUID, default: 50

View File

@@ -28,6 +28,7 @@ sshd:
maxConnNum: 20
timeout: 1800
session: multiple
mmlHome: ./mmlhome
database:
type: mysql

View File

@@ -97,8 +97,8 @@ func UploadSoftwareFile(w http.ResponseWriter, r *http.Request) {
}
filePrefix := fileName[:strings.Index(fileName, ".zip")]
filePath := fmt.Sprintf("%s/%s", softwarePath, fileName)
log.Debugf("filePath:%s filePrefix:%s softwarePath:%s", filePath, filePrefix, softwarePath)
cmd := exec.Command("unzip", "-f", filePath)
cmd.Dir = softwarePath
out, err := cmd.CombinedOutput()