summaryrefslogtreecommitdiffstats
path: root/remote/modules/printergui/data/opt/openslx/scripts/run-virt_print
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules/printergui/data/opt/openslx/scripts/run-virt_print')
-rwxr-xr-xremote/modules/printergui/data/opt/openslx/scripts/run-virt_print6
1 files changed, 6 insertions, 0 deletions
diff --git a/remote/modules/printergui/data/opt/openslx/scripts/run-virt_print b/remote/modules/printergui/data/opt/openslx/scripts/run-virt_print
index dfbcdfde..ba352778 100755
--- a/remote/modules/printergui/data/opt/openslx/scripts/run-virt_print
+++ b/remote/modules/printergui/data/opt/openslx/scripts/run-virt_print
@@ -45,8 +45,10 @@ if which gs 2>/dev/null; then
RET=$?
if [ $RET -ne 0 ]; then
errlog "printergui-validate" "Error: Ghostscript choked on input file" "$ERRLOG"
+ rm -f -- "$ERRLOG"
exit 1
fi
+ rm -f -- "$ERRLOG"
else
errlog "printergui-nogs" "Warning: Cannot validate file prior to printing: gs binary not found"
fi
@@ -57,5 +59,9 @@ RET=$?
if [ $RET -ne 0 -a $RET -ne 143 ]; then # SIGTERM results in 143, is sent by printpwgui
errlog "printergui-exec" "Error: printergui execution failed with exit code $RET"
fi
+
+sleep 1
+rm -f -- "$FILE"
+
exit $RET