if [ ${#} -ne 1 ]; then echo "You must provide a file name for the TANGO_HOST DB dump!" exit -1 # Check if the filename begins with /hosthome/, /opt/tango or /opt/lofar: elif [ ${1:0:10} != /hosthome/ -a ${1:0:11} != /opt/tango/ -a ${1:0:11} != /opt/lofar/ ]; then echo "You must provide a full file path that begins with one of \"/hosthome/\", \"/opt/tango/\" or \"/opt/lofar/\". Why is that? Because the file will be loaded from within the Docker container and only some of the host's file system directories are mounted in the container." exit -2 fi docker exec -it ${TANGO_CONTAINER_ENV} dsconfig json2tango --write --update ${1}