Skip to content
Snippets Groups Projects
Commit 80143633 authored by kaloyane's avatar kaloyane
Browse files

[LMS-2559] copy installation tarball to the correct backup directory after upgrade

SVN: 23196
parent 13f607af
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,8 @@ OPENBIS_INSTALL_DIR=$BASE/..
TARBALL=$1
INSTALLER_DIR=${TARBALL%.tar.gz}
mkdir -p $OPENBIS_INSTALL_DIR/backup
pushd $ROOT_DIR > /dev/null
echo "Extracting installation tarball $TARBALL.."
......@@ -25,14 +27,17 @@ sed -i '' "$sed_params" $INSTALLER_DIR/console.properties
# run the installation
$INSTALLER_DIR/run-console.sh
rm -rf $INSTALLER_DIR
echo "Moving $TARBALL to $OPENBIS_INSTALL_DIR/backup ..."
mkdir -p $OPENBIS_INSTALL_DIR/backup
mv $TARBALL $OPENBIS_INSTALL_DIR/backup
BACKUP_DIR_NAME=`ls -rt $OPENBIS_INSTALL_DIR/backup | tail -1`
BACKUP_DIR=$OPENBIS_INSTALL_DIR/backup/$BACKUP_DIR_NAME
echo "Moving $TARBALL to $BACKUP_DIR..."
mv $TARBALL $BACKUP_DIR
}
BASE=`dirname "$0"`
if [ ${BASE#/} == ${BASE} ]; then
BASE="`pwd`/${BASE}"
......
......@@ -49,6 +49,8 @@ OPENBIS_INSTALL_DIR=$BASE/..
TARBALL=$1
INSTALLER_DIR=${TARBALL%.tar.gz}
mkdir -p $OPENBIS_INSTALL_DIR/backup
pushd $ROOT_DIR > /dev/null
echo "Extracting installation tarball $TARBALL.."
......@@ -62,14 +64,17 @@ sed -i '' "$sed_params" $INSTALLER_DIR/console.properties
# run the installation
$INSTALLER_DIR/run-console.sh
rm -rf $INSTALLER_DIR
echo "Moving $TARBALL to $OPENBIS_INSTALL_DIR/backup ..."
mkdir -p $OPENBIS_INSTALL_DIR/backup
mv $TARBALL $OPENBIS_INSTALL_DIR/backup
BACKUP_DIR_NAME=`ls -rt $OPENBIS_INSTALL_DIR/backup | tail -1`
BACKUP_DIR=$OPENBIS_INSTALL_DIR/backup/$BACKUP_DIR_NAME
echo "Moving $TARBALL to $BACKUP_DIR..."
mv $TARBALL $BACKUP_DIR
}
BASE=`dirname "$0"`
if [ ${BASE#/} == ${BASE} ]; then
BASE="`pwd`/${BASE}"
......
......@@ -51,6 +51,8 @@ OPENBIS_INSTALL_DIR=$BASE/..
TARBALL=$1
INSTALLER_DIR=${TARBALL%.tar.gz}
mkdir -p $OPENBIS_INSTALL_DIR/backup
pushd $ROOT_DIR > /dev/null
echo "Extracting installation tarball $TARBALL.."
......@@ -64,14 +66,17 @@ sed -i '' "$sed_params" $INSTALLER_DIR/console.properties
# run the installation
$INSTALLER_DIR/run-console.sh
rm -rf $INSTALLER_DIR
echo "Moving $TARBALL to $OPENBIS_INSTALL_DIR/backup ..."
mkdir -p $OPENBIS_INSTALL_DIR/backup
mv $TARBALL $OPENBIS_INSTALL_DIR/backup
BACKUP_DIR_NAME=`ls -rt $OPENBIS_INSTALL_DIR/backup | tail -1`
BACKUP_DIR=$OPENBIS_INSTALL_DIR/backup/$BACKUP_DIR_NAME
echo "Moving $TARBALL to $BACKUP_DIR..."
mv $TARBALL $BACKUP_DIR
}
BASE=`dirname "$0"`
if [ ${BASE#/} == ${BASE} ]; then
BASE="`pwd`/${BASE}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment