bin/cpubench: don't wrap inside systemd-run
This commit is contained in:
@@ -60,28 +60,18 @@ const configFile = path.resolve(cpubenchDir, 'config', `rendered-${uuid}.config`
|
||||
|
||||
writeFileSync(configFile, cpubenchConfig);
|
||||
|
||||
const systemdArgs = [
|
||||
'--user',
|
||||
`--unit=${uuid}`,
|
||||
`--working-directory=${cpubenchDir}`,
|
||||
path.resolve(cpubenchDir, 'cpubench.sh'),
|
||||
`--config=${configFile}`,
|
||||
"--skip_verify=1",
|
||||
"--rebuild=1",
|
||||
"-i=1"
|
||||
];
|
||||
|
||||
const proc = spawn(
|
||||
'systemd-run',
|
||||
systemdArgs,
|
||||
path.resolve(cpubenchDir, 'cpubench.sh'),
|
||||
[
|
||||
`--config=${configFile}`,
|
||||
"--skip_verify=1",
|
||||
"--rebuild=1",
|
||||
"-i=1"
|
||||
],
|
||||
{ cwd: cpubenchDir }
|
||||
);
|
||||
|
||||
proc.stdout.pipe(process.stdout);
|
||||
proc.stderr.pipe(process.stderr);
|
||||
|
||||
console.log(`Command suggest:`);
|
||||
console.log(chalk.green(`systemctl --user status ${uuid}`));
|
||||
console.log(chalk.green(`journalctl --user -xeu ${uuid}`));
|
||||
|
||||
await promisifySpawn(proc);
|
||||
await promisifySpawn(proc);
|
||||
|
||||
Reference in New Issue
Block a user