From 1dc109c979d7788e8811b4eecfb8bfdf3b6ea6e2 Mon Sep 17 00:00:00 2001 From: Yaco Date: Tue, 19 Oct 2021 20:42:50 -0300 Subject: adds reevotech scripts --- bin/bkp/bkp_wiki.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'bin/bkp/bkp_wiki.sh') diff --git a/bin/bkp/bkp_wiki.sh b/bin/bkp/bkp_wiki.sh index c9aef4a4..7591d212 100755 --- a/bin/bkp/bkp_wiki.sh +++ b/bin/bkp/bkp_wiki.sh @@ -6,14 +6,26 @@ # EN: This file is part of: reevo-web (http://git.reevo.org/reevo/reevo-web) # ---- -cd /srv/reevo-2020/bin/bkp/ +cd /srv/reevotech -RUTA=`cat ../../etc/global_config.php | grep '^$REEVO_PATH' | cut -d '"' -f 2` -DOMINIO=`cat $RUTA/etc/global_config.php | grep '^$REEVO_URL' | cut -d '"' -f 2` -USER=`cat $RUTA/etc/global_config.php | grep '^$REEVO_DB_USER' | cut -d '"' -f 2` -PASSWORD=`cat $RUTA/etc/global_config.php | grep '^$REEVO_DB_PASS' | cut -d '"' -f 2` +if [ -z $1 ]; +then + echo "You must specify the deployment codename" + exit +fi -DB=`cat $RUTA/etc/global_config.php | grep '^$REEVO_DB_WIKI' | cut -d '"' -f 2` +DEPLOY=$1 +DEPLOYFILE=`ls ./etc | grep $DEPLOY` + +echo $DEPLOY +read +cd /srv/reevotech/bin/bkp/ +RUTA=`cat ../../etc/global_config-$DEPLOY.php | grep '^$REEVO_PATH' | cut -d '"' -f 2` +DOMINIO=`cat $RUTA/etc/global_config-$DEPLOY.php | grep '^$REEVO_URL' | cut -d '"' -f 2` +USER=`cat $RUTA/etc/global_config-$DEPLOY.php | grep '^$REEVO_DB_USER' | cut -d '"' -f 2` +PASSWORD=`cat $RUTA/etc/global_config-$DEPLOY.php | grep '^$REEVO_DB_PASS' | cut -d '"' -f 2` + +DB=`cat $RUTA/etc/global_config-$DEPLOY.php | grep '^$REEVO_DB_WIKI' | cut -d '"' -f 2` TIMESTAMP=`date +%Y-%m-%d-%H:%M:%S` echo "" -- cgit v1.2.1