aboutsummaryrefslogtreecommitdiff
path: root/tools/boca-submit-run-cron
blob: 83f5b4104c7adaa3b0d94e5c6353b2df741a4e0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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"
		fi
	done
fi