#!/bin/sh if test $# = 0; then echo "direct x10 \"X10-Controlled Printer\" \"X10 Printer Port\"" exit 0 fi starttime=`/bin/date` echo $starttime > '/var/state/x10/printer' ### Modify the a1 on the following line to the address of your printer ### /usr/local/bin/heyu turn a1 on #sleep 15 ### Modify the device to suit your printer port ### cat $6 >/dev/lp0 ### Modify the 2 minutes to be the desired time to wait before shutting off ### echo "/usr/local/bin/x10printeroff \"$starttime\"" | at now + 2 minutes exit 0