From 03087c4384fc21edfbce120ee580c4e20a5e0372 Mon Sep 17 00:00:00 2001 From: Hannes Feldt <feldt@astron.nl> Date: Fri, 22 Sep 2023 08:54:15 +0200 Subject: [PATCH] add network option --- sbin/dsconfig.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sbin/dsconfig.sh b/sbin/dsconfig.sh index b428dbdc7..a51b6c613 100755 --- a/sbin/dsconfig.sh +++ b/sbin/dsconfig.sh @@ -4,15 +4,18 @@ # SPDX-License-Identifier: Apache-2.0 # +# defaults +network="station" # list of arguments expected in the input -optstring_long="help,load,update,dump" -optstring="hlud" +optstring_long="help,load,update,dump,file,network::" +optstring="hludf:n::" options=$(getopt -l ${optstring_long} -o ${optstring} -- "$@") eval set -- "$options" + while true; do case ${1} in -h|--help) @@ -31,6 +34,10 @@ while true; do echo "Dump config" action="dump" ;; + -n|--network) + shift + network="$1" + ;; --) shift break;; @@ -42,7 +49,8 @@ if [ -z "$TAG" ]; then TAG="latest" fi -docker_args=(run --rm -e "TANGO_HOST=$TANGO_HOST" --network=station -i) +echo "Use docker network '$network'" +docker_args=(run --rm -e "TANGO_HOST=$TANGO_HOST" --network="$network" -i) docker_image="git.astron.nl:5000/lofar2.0/tango/dsconfig:$TAG" if [[ -n "$DNS" ]]; then -- GitLab