When pushed, this commit will replace hard-coded values with calls to LookupMQM

This commit is contained in:
Stephen Marshall
2018-04-25 14:09:23 +01:00
parent bf36f8bb2c
commit 3aa46e0793
6 changed files with 42 additions and 33 deletions

View File

@@ -19,6 +19,8 @@ import (
"fmt"
"os"
"path/filepath"
"github.com/ibm-messaging/mq-container/internal/command"
)
func configureWebTLS(cms *KeyStore) error {
@@ -76,9 +78,14 @@ func configureTLS(qmName string, inputFile string, passPhrase string) error {
if err != nil {
return err
}
err = os.Chown(dir, 999, 999)
mqmUID, mqmGID, err := command.LookupMQM()
if err != nil {
log.Debug(err)
log.Error(err)
return err
}
err = os.Chown(dir, mqmUID, mqmGID)
if err != nil {
log.Error(err)
return err
}
} else {