Don't impose tail -f checks.log
This commit is contained in:
parent
7fc7a002e3
commit
5f271ed858
2 changed files with 7 additions and 6 deletions
|
|
@ -41,8 +41,11 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate hashed path for files
|
# Generate hashed path for files
|
||||||
echo 'Copying files...'
|
echo -n 'Copying files... '
|
||||||
${BASEDIR}/gen_hash_link_files.sh --copy ${BASEDIR}/files-in ${BASEDIR}/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
|
# Continue execution
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|
|
||||||
|
|
@ -17,15 +17,13 @@ fi
|
||||||
mkdir -p ./logs
|
mkdir -p ./logs
|
||||||
|
|
||||||
touch ./logs/checks.log
|
touch ./logs/checks.log
|
||||||
tail -f ./logs/checks.log &
|
|
||||||
KP1=$!
|
|
||||||
|
|
||||||
TMPF=`mktemp`
|
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 &
|
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 ];
|
while ! [ -f /tmp/stop ];
|
||||||
do
|
do
|
||||||
|
|
@ -44,6 +42,6 @@ do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
kill -9 $KP1 $KP2
|
kill -9 $KP
|
||||||
|
|
||||||
rm -rf "$TMPF"
|
rm -rf "$TMPF"
|
||||||
|
|
|
||||||
Reference in a new issue