Merge pull request #55 from SatoshiPortal/dev

Recovered lost pre config and pre install in setup.sh
This commit is contained in:
kexkey
2019-01-22 14:13:49 -05:00
committed by GitHub

27
dist/setup.sh vendored
View File

@@ -562,19 +562,33 @@ realpath() {
}
sanity_checks() {
echo " check requirements."
check_docker() {
if ! [ -x "$(command -v docker)" ]; then
echo " docker is not installed on your system. Please check https://www.docker.com/get-started."
exit
fi
}
if [[ $DOCKER_MODE == 'compose' && ! -x "$(command -v docker-compose)" ]]; then
check_docker_compose() {
if ! [ -x "$(command -v docker-compose)" ]; then
echo " docker-compose is not installed on your system. Please check https://docs.docker.com/compose/install/."
exit
fi
}
sanity_checks_pre_config() {
echo " check requirements for configuration step."
check_docker
}
sanity_checks_pre_install() {
echo " check requirements for installation step."
check_docker
if [[ $DOCKER_MODE == 'compose' ]]; then
check_docker_compose
fi
local OS=$(uname -s)
@@ -723,6 +737,7 @@ if [[ $CONFIGURE == 0 && $INSTALL == 0 && $RECREATE == 0 ]]; then
fi
if [[ $CONFIGURE == 1 ]]; then
sanity_checks_pre_config
configure $RECREATE
fi
@@ -737,7 +752,7 @@ if [[ $CLEANUP == 'true' && $(docker image ls | grep cyphernodeconf) =~ cypherno
fi
if [[ $INSTALL == 1 ]]; then
sanity_checks
sanity_checks_pre_install
create_user
install
modify_owner