Skip to content

Commit

Permalink
Port checkup
Browse files Browse the repository at this point in the history
  • Loading branch information
tmachyshyn committed Feb 16, 2024
1 parent 43c896d commit 9206b25
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,13 @@ function forceServiceStop() {
function checkFixSystemRequirements() {
local os="$1"

# Check port
local isPortInUse=$(isPortInUse "${data[httpPort]}")

if [ "$isPortInUse" = true ]; then
printExitError "The required port \"${data[httpPort]}\" is already in use. Free up the port and try again."
fi

declare -a missingLibs=()

if ! [ -x "$(command -v wget)" ] && ! [ -x "$(command -v curl)" ]; then
Expand All @@ -384,13 +391,6 @@ function checkFixSystemRequirements() {
printExitError "Missing libraries: ${missingLibs[@]}. Please install them and try again."
;;
esac

# Check port
local isPortInUse=$(isPortInUse "${data[httpPort]}")

if [ "$isPortInUse" = true ]; then
printExitError "The required port \"${data[httpPort]}\" is already in use. Free up the port and try again."
fi
}

function getBackupDirectory() {
Expand Down

0 comments on commit 9206b25

Please sign in to comment.