mirror of
https://github.com/kasmtech/workspaces-core-images.git
synced 2024-11-21 15:03:14 +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
|
||||
#!/usr/bin/env bash
|
||||
set -x
|
||||
if [[ ${KASM_SVC_PRINTER:-1} == 1 ]]; then
|
||||
PRINTER_NAME=${KASM_PRINTER_NAME:-Kasm-Printer}
|
||||
until [[ "$(lpstat -r)" == "scheduler is running" ]]; do sleep 1; done
|
||||
if [[ \${KASM_SVC_PRINTER:-1} == 1 ]]; then
|
||||
PRINTER_NAME=\${KASM_PRINTER_NAME:-Kasm-Printer}
|
||||
until [[ "\$(lpstat -r)" == "scheduler is running" ]]; do sleep 1; done
|
||||
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
|
||||
done
|
||||
echo "Printer $PRINTER_NAME is idle."
|
||||
echo "Printer \$PRINTER_NAME is idle."
|
||||
else
|
||||
echo "Printing service is not enabled"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user