mirror of
https://github.com/kasmtech/workspaces-core-images.git
synced 2024-11-21 23:13:08 +01:00
KASM-5766 Properly excape variables
This commit is contained in:
parent
2870104a39
commit
3277aaf2fe
@ -37,15 +37,15 @@ echo "${BRANCH}:${COMMIT_ID}" > $STARTUPDIR/printer/kasm_printer.version
|
|||||||
cat >/usr/bin/printer_ready <<EOL
|
cat >/usr/bin/printer_ready <<EOL
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -x
|
set -x
|
||||||
if [[ ${KASM_SVC_PRINTER:-1} == 1 ]]; then
|
if [[ \${KASM_SVC_PRINTER:-1} == 1 ]]; then
|
||||||
PRINTER_NAME=${KASM_PRINTER_NAME:-Kasm-Printer}
|
PRINTER_NAME=\${KASM_PRINTER_NAME:-Kasm-Printer}
|
||||||
until [[ "$(lpstat -r)" == "scheduler is running" ]]; do sleep 1; done
|
until [[ "\$(lpstat -r)" == "scheduler is running" ]]; do sleep 1; done
|
||||||
echo "Scheduler is running"
|
echo "Scheduler is running"
|
||||||
|
|
||||||
until lpstat -p "$PRINTER_NAME" | grep -q "is idle"; do
|
until lpstat -p "\$PRINTER_NAME" | grep -q "is idle"; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
echo "Printer $PRINTER_NAME is idle."
|
echo "Printer \$PRINTER_NAME is idle."
|
||||||
else
|
else
|
||||||
echo "Printing service is not enabled"
|
echo "Printing service is not enabled"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user