Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tmachyshyn committed May 28, 2024
1 parent 1f09e8a commit 93c1671
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -691,11 +691,11 @@ Please choose the installation mode you prefer [1-2]:

function defineIpAddress() {
if [ -n "${data[domain]}" ]; then
return
defineDomainNameAutomatically
fi

if [ -n "$noConfirmation" ]; then
defineDomainNameutAomatically
defineDomainNameAutomatically
return
fi

Expand Down Expand Up @@ -730,16 +730,12 @@ Please choose your IP for the future EspoCRM instance [1-2]:
;;
esac

isIpValid=$(isIpValid "${data[domain]}")

if [ "$isIpValid" != true ]; then
printf "\nYour IP address is incorrect. Please enter again.\n"
read data[domain]
fi
validateIP
}

function defineDomainNameutAomatically() {
function defineDomainNameAutomatically() {
if [ -n "${data[domain]}" ]; then
validateIP
return
fi

Expand All @@ -757,6 +753,23 @@ function defineDomainNameutAomatically() {
esac
}

function validateIP() {
isIpValid=$(isIpValid "${data[domain]}")

if [ -z "$noConfirmation" ]; then
if [ "$isIpValid" != true ]; then
printf "\nYour IP address is incorrect. Please enter again.\n"
read data[domain]
fi

isIpValid=$(isIpValid "${data[domain]}")
fi

if [ "$isIpValid" != true ]; then
printExitError "Incorrect IP address. Please try again."
fi
}

function handleInstallationMode() {
local mode="$1"

Expand Down

0 comments on commit 93c1671

Please sign in to comment.