+upd metactl.scripts now launches CI for env & web in background (pre-start, killed in post-stop)
This commit is contained in:
parent
9ba0eef9c5
commit
e50e67fbf4
|
@ -48,7 +48,11 @@ if [ "$DUMP_FILE_EXISTS" = "0" ]; then
|
|||
|
||||
else
|
||||
|
||||
echo "missing";
|
||||
ec @echo -n "*** Create trigger.............";
|
||||
@test ! -d ./virtual/ci && mkdir ./virtual/ci; (exit 0);
|
||||
@chmod 777 ./virtual/ci; (exit 0);
|
||||
@touch ./virtual/ci/trigger; echo "done";
|
||||
@chmod 777 ./virtual/ci/trigger; (exit 0);ho "missing";
|
||||
|
||||
# Create 'persistent' directory if missing
|
||||
test ! -d $ROOT/persistent && mkdir -p $ROOT/persistent;
|
||||
|
|
|
@ -6,4 +6,24 @@ source $(dirname `realpath $0`)/environment.sh;
|
|||
## ##
|
||||
## Executed after stopping containers ##
|
||||
## ##
|
||||
############################################
|
||||
############################################
|
||||
|
||||
# 1. Stop 'env' spy
|
||||
echo -ne " * Kill 'env' spy............";
|
||||
PID_FILE="$ROOT/ci/env.pid";
|
||||
if [ -f $PID_FILE ]; then
|
||||
kill -9 `cat $PID_FILE` 2>/dev/null && echo "killed" || (echo "fail"; exit 1);
|
||||
else
|
||||
echo "already";
|
||||
fi;
|
||||
rm $PID_FILE >/dev/null 2>&1;
|
||||
|
||||
# 2. Stop 'web' spy
|
||||
echo -ne " * Kill 'web' spy............";
|
||||
PID_FILE="$ROOT/ci/web.pid";
|
||||
if [ -f $PID_FILE ]; then
|
||||
kill -9 `cat $PID_FILE` 2>/dev/null && echo "killed" || (echo "fail"; exit 1);
|
||||
else
|
||||
echo "already";
|
||||
fi;
|
||||
rm $PID_FILE >/dev/null 2>&1;
|
|
@ -6,4 +6,31 @@ source $(dirname `realpath $0`)/environment.sh;
|
|||
## ##
|
||||
## Executed before launching containers ##
|
||||
## ##
|
||||
##############################################
|
||||
##############################################
|
||||
|
||||
# 1. Create CI folder
|
||||
echo -ne " * Create CI control folder..";
|
||||
test ! -d `dirname $ROOT`/virtual/ci && ( mkdir -p `dirname $ROOT`/virtual/ci && echo "created" || (echo "failed"; exit 1) ) || echo "already";
|
||||
chmod o=rx `dirname $ROOT`/virtual/ci;
|
||||
|
||||
# 2. Create 'env' trigger
|
||||
echo -ne " * Create 'env' trigger......";
|
||||
test ! -f `dirname $ROOT`/virtual/ci/env && ( touch `dirname $ROOT`/virtual/ci/env && echo "created" || (echo "failed"; exit 1)) || echo "already";
|
||||
chmod o+rwx `dirname $ROOT`/virtual/ci/env;
|
||||
|
||||
# 3. Create 'web' trigger
|
||||
echo -ne " * Create 'web' trigger......";
|
||||
test ! -f `dirname $ROOT`/virtual/ci/web && ( touch `dirname $ROOT`/virtual/ci/web && echo "created" || (echo "failed"; exit 1)) || echo "already";
|
||||
chmod o+rwx `dirname $ROOT`/virtual/ci/web;
|
||||
|
||||
# 3. Create 'env' spy
|
||||
echo -ne " * Launch 'env' spy..........";
|
||||
( sh $ROOT/ci/env.sh )&
|
||||
echo "launched";
|
||||
echo -n "$!" > $ROOT/ci/env.pid;
|
||||
|
||||
# 3. Create 'web' spy
|
||||
echo -ne " * Launch 'web' spy..........";
|
||||
( sh $ROOT/ci/web.sh )&
|
||||
echo "launched";
|
||||
echo -n "$!" > $ROOT/ci/web.pid;
|
Loading…
Reference in New Issue