diff --git a/launch.sh b/launch.sh index aabe646f..f99b81e4 100755 --- a/launch.sh +++ b/launch.sh @@ -25,6 +25,8 @@ TMPF=`mktemp` tail -f "$TMPF" | ./gen_site.pl -d -s /tmp/test.sock -o ./out ERRORS HOME all DS & KP2=$! +trap "kill $KP1 $KP2; rm -rf '$TMPF'; echo" SIGINT SIGTERM + while ! [ -f /tmp/stop ]; do ./synchro.sh delete diff --git a/launch_local.sh b/launch_local.sh index d4850c12..87b5a8f1 100755 --- a/launch_local.sh +++ b/launch_local.sh @@ -25,6 +25,8 @@ TMPF=`mktemp` tail -f "$TMPF" | ./gen_site.pl -d -s /tmp/test.sock -bt /challenge/ -ba /challenge-admin/ -o ./out ERRORS HOME all DS & KP2=$! +trap "kill $KP1 $KP2; rm -rf '$TMPF'; echo" SIGINT SIGTERM + while ! [ -f /tmp/stop ]; do if [ `ls submission | wc -l` -gt 1 ]