Don't impose tail -f checks.log

This commit is contained in:
Némunaire 2015-01-18 07:01:30 +01:00 committed by Nemunaire
parent 7fc7a002e3
commit 5f271ed858
2 changed files with 7 additions and 6 deletions

View File

@ -41,8 +41,11 @@ else
fi
# Generate hashed path for files
echo 'Copying files...'
echo -n 'Copying files... '
${BASEDIR}/gen_hash_link_files.sh --copy ${BASEDIR}/files-in ${BASEDIR}/files
echo -e "\033[32mdone\033[0m"
echo -e "\033[1;33mYou should run in background:\033[0m tail -f ./logs/checks.log &"
# Continue execution
exec "$@"

View File

@ -17,15 +17,13 @@ fi
mkdir -p ./logs
touch ./logs/checks.log
tail -f ./logs/checks.log &
KP1=$!
TMPF=`mktemp`
tail -f "$TMPF" | ./gen_site.pl -d -T /dev/shm -s /tmp/scheduler.sock -bt /challenge/ -ba /challenge-admin/ -o ./out ERRORS HOME all DS >> ./logs/generation.log &
KP2=$!
KP=$!
trap "kill $KP1 $KP2; rm -rf '$TMPF'; echo; kill $$" INT TERM
trap "kill -9 $KP; rm -rf '$TMPF'; echo" INT TERM
while ! [ -f /tmp/stop ];
do
@ -44,6 +42,6 @@ do
fi
done
kill -9 $KP1 $KP2
kill -9 $KP
rm -rf "$TMPF"