Provide pcp config file from commandline.
Taking pcp config file name (or path) from commandline. In scheduler.go, also checking to see if provided pcp config file exists. If not, then exitting.
This commit is contained in:
parent
8e87bcb439
commit
1e9828c35b
4 changed files with 20 additions and 9 deletions
|
@ -14,9 +14,10 @@ import (
|
|||
"gitlab.com/spdf/elektron/schedulers"
|
||||
)
|
||||
|
||||
func Start(quit chan struct{}, logging *bool, logMType chan elekLogDef.LogMessageType, logMsg chan string, s scheduler.Scheduler) {
|
||||
func Start(quit chan struct{}, logging *bool, logMType chan elekLogDef.LogMessageType,
|
||||
logMsg chan string, pcpConfigFile string, s scheduler.Scheduler) {
|
||||
baseSchedRef := s.(*schedulers.BaseScheduler)
|
||||
const pcpCommand string = "pmdumptext -m -l -f '' -t 1.0 -d , -c config"
|
||||
const pcpCommand string = "pmdumptext -m -l -f '' -t 1.0 -d , -c " + pcpConfigFile
|
||||
cmd := exec.Command("sh", "-c", pcpCommand)
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
|
||||
|
||||
|
|
Reference in a new issue