From 4b868e05f4a5ac7119b8fb216f2d86d743c79635 Mon Sep 17 00:00:00 2001 From: Esteban Barrios Date: Mon, 4 Sep 2023 16:10:26 +0200 Subject: [PATCH] Added silence to curl and unzip. Also added some comments to make the output looks nicer --- entrypoint.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index cb54582..0105608 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -10,20 +10,24 @@ fi if [ -z "$NOMAD_ADDR" ]; then + echo -e "NOMAD_ADDR variable not set.\nUsing default value: http://127.0.0.1" NOMAD_ADDR = "http://127.0.0.1" fi if [ -z "$NOMAD_PORT" ]; then + echo -e "NOMAD_PORT variable not set.\nUsing default value: 4646" NOMAD_PORT = "4646" fi if ! command -v nomad &> /dev/null then - curl https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_linux_amd64.zip -o nomad.zip && \ - unzip nomad.zip && \ + echo -e "Installing nomad..." + curl -sS https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_linux_amd64.zip -o nomad.zip && \ + unzip -qq nomad.zip && \ mv nomad /usr/local/bin/ && \ rm nomad.zip + echo -e "Installed Nomad version:" $(NOMAD_VERSION) fi echo -e "NOMAD_ADDR:" $NOMAD_ADDR "\nNOMAD_PORT:" $NOMAD_PORT "\nNOMAD_JOB:" $NOMAD_JOB""