Don't impose tail -f checks.log
authorNĂ©munaire <nemunaire@pomail.fr>
Sun, 18 Jan 2015 06:01:30 +0000 (07:01 +0100)
committerNemunaire <nemunaire@nemunai.re>
Fri, 23 Jan 2015 00:59:25 +0000 (01:59 +0100)
entrypoint.sh
launch.sh

index bc16099..70049f8 100755 (executable)
@@ -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 "$@"
index 04d43e8..376ddc1 100755 (executable)
--- a/launch.sh
+++ b/launch.sh
@@ -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"