From f084d6636c7e42ab834a3a9b3ecd2095d9b4b0ec Mon Sep 17 00:00:00 2001
From: stedif <stefano.difrischia@inaf.it>
Date: Mon, 11 Oct 2021 13:14:35 +0200
Subject: [PATCH] L2SS-409: fix shellcheck start-jive.sh

---
 bin/start-jive.sh | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/bin/start-jive.sh b/bin/start-jive.sh
index fcbb9f8b5..38e04ce18 100755
--- a/bin/start-jive.sh
+++ b/bin/start-jive.sh
@@ -1,9 +1,10 @@
+#!/bin/bash
 OS=$(uname)
 
 case ${OS} in
     Linux)
         display=""
-        XTRA_OPTIONS="-u $(id -u ${USER}):$(id -g ${USER}) -v /etc/passwd:/etc/passwd:ro -v /etc/groups:/etc/groups:ro"
+        XTRA_OPTIONS="-u $(id -u "${USER}"):$(id -g "${USER}") -v /etc/passwd:/etc/passwd:ro -v /etc/groups:/etc/groups:ro"
 
         ;;
     Darwin)
@@ -28,10 +29,10 @@ else
 fi
 
 #docker run --rm -it --network host ${OPTIONS} nexus.engageska-portugal.pt/ska-docker/tango-java:latest ${command} ${@}
-container_name=artefact.skatelescope.org/ska-tango-images/tango-java:9.3.3.2
-container=$(docker ps | egrep ${container_name} | cut -d' ' -f1)
-if [ ! -z ${container} ]; then
-    docker exec -it ${container} ${command} ${@}
+container_name=artefact.skao.int/ska-tango-images-tango-java:9.3.4
+container=$(docker ps | grep -E ${container_name} | cut -d' ' -f1)
+if [ ! -z "${container}" ]; then
+    docker exec -it "${container}" ${command} "${@}"
 else
     echo "Container \"${container_name}\" is not running."
 fi
-- 
GitLab