This repository has been archived on 2025-06-10. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
server/launch.sh

33 lines
480 B
Bash
Executable file

#!/bin/sh
rm -f /tmp/stop
cd `dirname "$0"`
if [ "$UID" = "0" ]
then
SCRIPT=`pwd`/`basename "$0"`
su -c "sh $SCRIPT" synchro
exit $?
fi
touch ./logs/checks.log
tail -f ./logs/checks.log &
TMPF=`mktemp`
tail -f "$TMPF" | ./gen_site.pl -d -s /tmp/test.sock -o ./out &
while ! [ -f /tmp/stop ];
do
./synchro.sh delete
if [ `ls submission | wc -l` -gt 1 ]
then
./check.pl 2>> ./logs/checks.log >> "$TMPF"
else
sleep 1
fi
done
rm -rf "$TMPF"