Skip to content

Instantly share code, notes, and snippets.

@jps3
Created April 12, 2019 17:14
Show Gist options
  • Save jps3/8709659b65b58279446978cf2ece5431 to your computer and use it in GitHub Desktop.
Save jps3/8709659b65b58279446978cf2ece5431 to your computer and use it in GitHub Desktop.
The RICOH Ri 100 garment printer will cause its queue to be disabled by CUPS when jobs languish in the queue.
#!/bin/bash
# Used with chilcote/outset
# /usr/local/outset/login-privileged-every/force_ricoh_ri_100_reset.sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
PRINTER="RICOH_Ri_100"
logger -is "[$0] Cancelling all jobs for \"${PRINTER}\""
cancel -a "${PRINTER}"
logger -is "[$0] 'cancel -a $PRINTER' returned: $?"
logger -is "[$0] Forcing enabled state for \"${PRINTER}\""
cupsenable "${PRINTER}"
logger -is "[$0] 'cupsenable $PRINTER' returned: $?"
logger -is "[$0] Forcing job accept state for \"${PRINTER}\""
cupsaccept "${PRINTER}"
logger -is "[$0] 'cupsaccept $PRINTER' returned: $?"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment