From a09e2c8b0b9fb8faa034d480a41a5943b445bdf1 Mon Sep 17 00:00:00 2001 From: Antonio Calanducci Date: Wed, 8 Nov 2023 12:15:11 +0100 Subject: [PATCH] Update gcube-start-container script to create gcube-data dirs --- src/gcube-start-container.sh | 42 +++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/gcube-start-container.sh b/src/gcube-start-container.sh index a177692..46b678b 100644 --- a/src/gcube-start-container.sh +++ b/src/gcube-start-container.sh @@ -1,26 +1,28 @@ #! /bin/bash -if [ -n "$EXIST_HOME" ]; then - # our container is running a IS Collector - if [ -L "$EXIST_HOME/webapp/WEB-INF/data" ] ; then - # exist data has been already mounted on NFS - echo "eXist data should be already in place on NFS" - elif [ -d "$EXIST_HOME/webapp/WEB-INF/data" ] ; then - echo "First run: set up our directory structure on the NFS mountpoint" - mkdir -p /gcube-data/{db,backup} && mv $EXIST_HOME/webapp/WEB-INF/{data,logs,attachments} /gcube-data/db/ - if [ $? -eq 0 ]; then - for dir in {data,logs,attachments}; do - ln -s /gcube-data/db/${dir} $EXIST_HOME/webapp/WEB-INF/${dir} - done - else - echo "Move failed: data already exists on NFS" - exit 1 - fi - else - echo "Not a link, not a directory: a pony :-)?" - fi -fi +# if [ -n "$EXIST_HOME" ]; then +# # our container is running a IS Collector +# if [ -L "$EXIST_HOME/webapp/WEB-INF/data" ] ; then +# # exist data has been already mounted on NFS +# echo "eXist data should be already in place on NFS" +# elif [ -d "$EXIST_HOME/webapp/WEB-INF/data" ] ; then +# echo "First run: set up our directory structure on the NFS mountpoint" +# mkdir -p /gcube-data/{db,backup} && mv $EXIST_HOME/webapp/WEB-INF/{data,logs,attachments} /gcube-data/db/ +# if [ $? -eq 0 ]; then +# for dir in {data,logs,attachments}; do +# ln -s /gcube-data/db/${dir} $EXIST_HOME/webapp/WEB-INF/${dir} +# done +# else +# echo "Move failed: data already exists on NFS" +# exit 1 +# fi +# else +# echo "Not a link, not a directory: a pony :-)?" +# fi +# fi + +mkdir -p /gcube-data/db/{data,logs,attachments} if [ -z "$GLOBUS_LOCATION" ]