diff --git a/sbin/dsconfig.sh b/sbin/dsconfig.sh index b428dbdc71094f28ba3ce5d4d0fed9996aed8d5c..a51b6c61351ea78b968a0c8e882ac44dd107955c 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