diff options
Diffstat (limited to 'tools/boca-submit-run-cron')
| -rwxr-xr-x | tools/boca-submit-run-cron | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/tools/boca-submit-run-cron b/tools/boca-submit-run-cron index c77b4d5..ace21d0 100755 --- a/tools/boca-submit-run-cron +++ b/tools/boca-submit-run-cron @@ -1,5 +1,17 @@ #!/bin/bash -for i in `ls /root/submissions/*.bocarun`; do - boca-submit-run-aux "$i" -done +if [ "`id -u`" != "0" ]; then + echo "Must be run as root" + exit 1 +fi + +if [ -d /root/submissions ]; then + 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 + $runaux "$i" + done +fi |