|
|
|
|
|
|
|
|
console.log(serverPid) |
|
|
console.log(serverPid) |
|
|
kill(serverPid) |
|
|
kill(serverPid) |
|
|
} |
|
|
} |
|
|
|
|
|
, 'model' : () => { |
|
|
|
|
|
if (__isElevated) { |
|
|
|
|
|
var tasks = [ |
|
|
|
|
|
() => { |
|
|
|
|
|
var p = nodeShellExec('mklink', [ `${processedArgs._[2]}.json` |
|
|
|
|
|
, `..\\..\\node_modules\\chess-server-lib\\common\\models\\${processedArgs._[2]}.json`], { |
|
|
|
|
|
inherit: true, shell: true |
|
|
|
|
|
, cwd : instanceroot + `/${selectedinstance.instanceName}-server/${selectedinstance}/models` |
|
|
|
|
|
, env: process.env |
|
|
|
|
|
}).catch((e) => { console.error(e) }) |
|
|
|
|
|
return p; |
|
|
|
|
|
} |
|
|
|
|
|
]; |
|
|
|
|
|
return any(tasks).then(() => { |
|
|
|
|
|
fs.writeFileSync('run.done', 'success') |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
fs.writeFileSync('run.done', 'error') |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
else return op['runas']() |
|
|
|
|
|
} |
|
|
, 'use' : () => { |
|
|
, 'use' : () => { |
|
|
// use a certain named instance. |
|
|
// use a certain named instance. |
|
|
// Eg : |
|
|
// Eg : |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
, getpulltask(def){ |
|
|
, getpulltask(def){ |
|
|
|
|
|
|
|
|
|
|
|
def = def || { |
|
|
|
|
|
requiresElevation : true, |
|
|
|
|
|
reqularRepos : gitRepos, |
|
|
|
|
|
elevatedRepos : elevatedRunasRepos |
|
|
|
|
|
} |
|
|
console.log(`-------------------Processing pull for : ${def.repo} ${def.branch}`) |
|
|
console.log(`-------------------Processing pull for : ${def.repo} ${def.branch}`) |
|
|
console.dir(def) |
|
|
console.dir(def) |
|
|
|
|
|
|