Merge pull request 'systemd fix' (#4) from dev into master

Reviewed-on: https://git.pooper.social/verita84/picluster/pulls/4
This commit is contained in:
verita84 2022-08-15 16:20:27 +00:00
commit 8bc487b521

View File

@ -408,9 +408,7 @@ function systemd(data) {
}
});
} else if (unit_file.indexOf('podman run') > -1) {
final_arguments = data.split(';');
final_line = final_arguments[0].split(name);
end_line = 'ExecStart=/bin/sh -c \"' + final_line + ';exit 0;\"';
end_line = 'ExecStart=/bin/sh -c \"' + req.body.command + ';exit 0;\"';
fs.appendFile('/etc/systemd/system/picluster-' + name + '.service', end_line + '\n', err => {
if (err) {
console.log(err);