38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#! /bin/bash
|
|
|
|
>&2 echo -e "\033[;96mRUNNING\033[;39m configurations"
|
|
./config.sh
|
|
if [ $? -ne "0" ]; then
|
|
>&2 echo -e "\033[;31mFAILED\033[;39m configurations"
|
|
exit 1;
|
|
fi
|
|
>&2 echo -e "\033[;32mSUCCEEDED\033[;39m configurations"
|
|
|
|
if [[ $((RUN_MASK & 1)) -eq 1 ]]
|
|
then
|
|
>&2 echo -e "\033[;96mRUNNING\033[;39m RUN_MASK 1 - contract deployment"
|
|
./reset.sh
|
|
# cic-eth-xxx services rely on
|
|
export RUN_MASK_PHASE=1
|
|
./docker/init_readyz.sh &
|
|
echo 0
|
|
if [ $? -ne "0" ]; then
|
|
>&2 echo -e "\033[;31mFAILED\033[;39m RUN_MASK 1 - contract deployment"
|
|
exit 1;
|
|
fi
|
|
>&2 echo -e "\033[;32mSUCCEEDED\033[;39m RUN_MASK 1 - contract deployment"
|
|
fi
|
|
|
|
if [[ $((RUN_MASK & 2)) -eq 2 ]]
|
|
then
|
|
>&2 echo -e "\033[;96mRUNNING\033[;39m RUN_MASK 2 - custodial service initialization"
|
|
./seed_cic_eth.sh
|
|
if [ $? -ne "0" ]; then
|
|
>&2 echo -e "\033[;31mFAILED\033[;39m RUN_MASK 2 - custodial service initialization"
|
|
exit 1;
|
|
fi
|
|
>&2 echo -e "\033[;32mSUCCEEDED\033[;39m RUN_MASK 2 - custodial service initialization"
|
|
fi
|
|
# this will leave the container up and serving the results of the migration
|
|
wait
|