#!/bin/bash

chr() {
  printf \\$(printf '%03o' $1)
}

APPLY=$1

if [ "$APPLY" = "" ]; then
  /opt/pos/common/bin/drawer_xprinter.sh 1 &
else
  sleep 1

  chr 0x1B > /dev/usb_lp_printer
  chr 0x70 > /dev/usb_lp_printer
  chr 0x00 > /dev/usb_lp_printer
  chr 0x60 > /dev/usb_lp_printer
  chr 0xFF > /dev/usb_lp_printer
fi

