2018-02-18 14:28:52 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source $(dirname `realpath $0`)/environment.sh;
|
|
|
|
|
|
|
|
##############################################
|
|
|
|
## ##
|
|
|
|
## Executed before launching containers ##
|
|
|
|
## ##
|
2018-02-19 20:33:19 +00:00
|
|
|
##############################################
|
|
|
|
|
|
|
|
# 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";
|
|
|
|
|
|
|
|
# 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";
|
|
|
|
|
|
|
|
# 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";
|
|
|
|
|
|
|
|
# 3. Create 'env' spy
|
|
|
|
echo -ne " * Launch 'env' spy..........";
|
2018-02-19 20:40:05 +00:00
|
|
|
( bash $ROOT/ci/env.sh )&
|
2018-02-19 20:33:19 +00:00
|
|
|
echo "launched";
|
|
|
|
echo -n "$!" > $ROOT/ci/env.pid;
|
|
|
|
|
|
|
|
# 3. Create 'web' spy
|
|
|
|
echo -ne " * Launch 'web' spy..........";
|
2018-02-19 20:40:05 +00:00
|
|
|
( bash $ROOT/ci/web.sh )&
|
2018-02-19 20:33:19 +00:00
|
|
|
echo "launched";
|
|
|
|
echo -n "$!" > $ROOT/ci/web.pid;
|