Update gcube-start-container script to create gcube-data dirs
This commit is contained in:
parent
9800815d0a
commit
a09e2c8b0b
|
@ -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" ]
|
||||
|
|
Loading…
Reference in New Issue