summaryrefslogtreecommitdiffstats
path: root/server/lib/shell.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/shell.js')
-rw-r--r--server/lib/shell.js14
1 files changed, 3 insertions, 11 deletions
diff --git a/server/lib/shell.js b/server/lib/shell.js
index 8d609e4..81d3008 100644
--- a/server/lib/shell.js
+++ b/server/lib/shell.js
@@ -61,19 +61,11 @@ module.exports = {
shell.mv(path.join(__appdir, 'ipxe', 'undionly.kpxe'), path.join(__appdir, 'ipxe', 'ipxe.' + ipxeVersion))
},
- stopBuilding: async function (req, res) {
- // TODO: KILLING IS NOT WORKING.. fml
+ cancelBuilding: async function (req, res) {
const process = make[req.params.version]
- console.log(process)
if (process) {
- console.log('KILLING IT °_°')
- // process.stdin.pause()
- // shell.kill(process.pid, 'SIGINT')
- // const kill = 'kill -2 ' + process.pid
- // console.log(kill)
- // shell.exec(kill)
- // process.kill("SIGINT")
- // child.exec("kill -2 " + process.pid)
+ const kill = 'pkill -P ' + process.pid
+ shell.exec(kill)
}
res.send({ status: 'SUCCESS', data: process })
},