From 65dc8563c699873b5f8fcafcf3cd416cbfb3ee65 Mon Sep 17 00:00:00 2001 From: Hugo Gillberg <35702510+hugil@users.noreply.github.com> Date: Sat, 25 Dec 2021 18:03:40 +0100 Subject: [PATCH] Update deploy-elastic.sh # check for dependencies, if they do not exist then install them # jq isn't included by default in Ubuntu, so this can easily be missed and break the script. --- deploy-elastic.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/deploy-elastic.sh b/deploy-elastic.sh index a714dd9..df6f8d4 100755 --- a/deploy-elastic.sh +++ b/deploy-elastic.sh @@ -71,6 +71,15 @@ help() { ############################################################################################################### +# check for dependencies, if they do not exist then install them +# jq isn't included by default in Ubuntu, so this can easily be missed and break the script. +checkdependencies() { +if ! command -v jq &> /dev/null +then + sudo apt install jq +fi +} + # check for version and make sure its [6..8].x.x and assign MAJOR MINOR BUGFIX number version() { if [ -z ${1} ]; then @@ -264,6 +273,7 @@ stack() { echo "${green}********** Deploying elasticsearch & kibana "${VERSION}" **********${reset}" # some checks first + checkdependencies checkmaxmapcount checkdocker checkcontainer