#!/bin/bash if [ "`id -u`" != "0" ]; then echo "Must be run as root" exit 1 fi if [ -d /root/submissions ]; then touch /root/submissions/placeholder.bocarun runaux=`which boca-submit-run-aux` if [ "$runaux" == "" ]; then runaux=/var/www/boca/tools/boca-submit-run-aux fi for i in `ls /root/submissions/*.bocarun`; do if [ "$i" != "/root/submissions/placeholder.bocarun" ]; then $runaux "$i" res=$? if [ "$res" == "2" ]; then echo "$i: time-out - this will automatically retry soon" fi if [ "$res" == "0" ]; then mv "$i" "${i}.processed" fi fi done fi