Skip to content
Snippets Groups Projects
update_ConfigDb.sh 690 B
Newer Older
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/lofar2.0/tango or /opt/lofar2.0/:
elif [ ${1:0:10} != /hosthome/ -a ${1:0:20} != /opt/lofar2.0/tango/ -a ${1:0:14} != /opt/lofar2.0/ ]; then
    echo "You must provide a full file path that begins with one of \"/hosthome/\", \"/opt/lofar2.0/tango/\" or \"/opt/lofar2.0/\".  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."
docker exec -it ${TANGO_CONTAINER_ENV} dsconfig json2tango --write --update ${1}