stop print-fetch before stopping print

This commit is contained in:
Simon Voordouw 2017-06-27 17:42:19 +02:00
parent d9e84308dd
commit 0acc20f498
1 changed files with 3 additions and 2 deletions

View File

@ -166,13 +166,14 @@ function M.stop_POST(request, response)
local printer,msg = printerUtils.createPrinterOrFail(argId, response)
if not printer or not printer:hasSocket() then return end
io.popen("killall print-fetch")
io.popen("rm /tmp/current-print /tmp/startcode /tmp/endcode")
if(argGcode == nil) then
argGcode = ""
end
local rv,msg = printer:stopPrint(argGcode)
io.popen("killall print-fetch")
io.popen("rm /tmp/current-print /tmp/startcode /tmp/endcode")
response:addData('id', argId)