diff --git a/install/generator-cyphernode/generators/app/templates/installer/start.sh b/install/generator-cyphernode/generators/app/templates/installer/start.sh index 755ab73..be03bd7 100644 --- a/install/generator-cyphernode/generators/app/templates/installer/start.sh +++ b/install/generator-cyphernode/generators/app/templates/installer/start.sh @@ -30,9 +30,22 @@ esac # Will test if Cyphernode is fully up and running... docker run --rm -it -v $current_path/testfeatures.sh:/testfeatures.sh \ --v <%= gatekeeper_datapath %>:/gatekeeper \ +-v ~/.cyphernode/gatekeeper:/gatekeeper \ +-v $current_path/exitStatus.sh:/exitStatus.sh \ --network cyphernodenet alpine:3.8 /testfeatures.sh +if [[ -f $current_path/exitStatus.sh ]]; then + . $current_path/exitStatus.sh + rm $current_path/exitStatus.sh +fi + +if [[ ! $EXIT_STATUS == 0 ]]; then + exec ./stop.sh + exit 1 +fi + + + printf "\r\n\033[0;92mDepending on your current location and DNS settings, point your favorite browser to one of the following URLs to access Cyphernode's status page:\r\n" printf "\r\n" printf "\033[0;95m<% cns.forEach(cn => { %><%= ('https://' + cn + '/status/\\r\\n') %><% }) %>\033[0m\r\n" diff --git a/install/generator-cyphernode/generators/app/templates/installer/testfeatures.sh b/install/generator-cyphernode/generators/app/templates/installer/testfeatures.sh index b1fb1c8..ef71edf 100644 --- a/install/generator-cyphernode/generators/app/templates/installer/testfeatures.sh +++ b/install/generator-cyphernode/generators/app/templates/installer/testfeatures.sh @@ -313,3 +313,5 @@ result="{${result}]}" echo "${result}" > /gatekeeper/installation.json echo -e "\r\n\e[1;32mTests finished.\e[0m" > /dev/console + +echo "EXIT_STATUS=${returncode}" > /exitStatus.sh