X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=autox;h=245bc3b4aa534eb9f6f65cc4c633132b1573ffae;hb=0c5a57f891c0736de1394e443c78d1204acdd35e;hp=02dcbabdc826f9fab7920ff03d68c38c63e8f815;hpb=926d32df222f5b9ceb962b852c194aac6d1dc1cd;p=autox diff --git a/autox b/autox index 02dcbab..245bc3b 100755 --- a/autox +++ b/autox @@ -3,13 +3,18 @@ TIMEOUT=20 PIDFILE=/var/run/autox.pid +if [ -z "$1" ]; then + echo "Usage: $0 " 1>&2 + exit 1 +fi + echo $$ > $PIDFILE trap "rm -f $PIDFILE; killall -9 startx" 0 fails=0 while true; do start_time=`date "+%s"` - openvt -w -- su -c startx olpc + openvt -w -- su -c startx $1 end_time=`date "+%s"` timediff=$((end_time-start_time))