summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2016-01-07 14:43:00 +0100
committerSimon Rettberg2016-01-07 14:43:00 +0100
commit63adc9b120bd54351fb471690dfb7a13a9fab625 (patch)
tree19c4361ae28dbeaff71378e4c3267af7103f2dcc
parent[vmware] Delete stale redo files on xorg startup/reset (diff)
downloadtm-scripts-63adc9b120bd54351fb471690dfb7a13a9fab625.tar.gz
tm-scripts-63adc9b120bd54351fb471690dfb7a13a9fab625.tar.xz
tm-scripts-63adc9b120bd54351fb471690dfb7a13a9fab625.zip
[printergui] Delete temp file after printing
-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