summaryrefslogtreecommitdiff
path: root/bin/bkp
diff options
context:
space:
mode:
Diffstat (limited to 'bin/bkp')
-rwxr-xr-xbin/bkp/bkp_wiki.sh24
1 files changed, 18 insertions, 6 deletions
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 ""