aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM.Gergo2018-03-04 18:37:38 +0100
committerM.Gergo2018-03-04 18:37:38 +0100
commit48691eb01676b83161c019531f02c7e7f734c445 (patch)
tree302c0b3a81695fac81f4808abc66e808320221c8
parent251b9285c49688f127fa523a715d924f8bcf7f4b (diff)
downloadmayor-48691eb01676b83161c019531f02c7e7f734c445.tar.gz
mayor-48691eb01676b83161c019531f02c7e7f734c445.zip
apróbb módosítások
-rw-r--r--.gitignore1
-rw-r--r--mayor/bin/backup.sh5
-rwxr-xr-xmayor/bin/mayor1
-rw-r--r--mayor/bin/restore.sh30
4 files changed, 20 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..0519ecba
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+ \ No newline at end of file
diff --git a/mayor/bin/backup.sh b/mayor/bin/backup.sh
index af02cccf..b554ab4a 100644
--- a/mayor/bin/backup.sh
+++ b/mayor/bin/backup.sh
@@ -58,7 +58,8 @@ while [ $# -ge 1 ]; do
--skip-lock | -l ) SKIPLOCK=1
;;
- --now | -n ) DATE=$(date "+%Y%m%d_%H%M%S")
+ --now | -n ) shift
+ DATE=$(date "+%Y%m%d_%H%M%S")
BACKUPFILE="$DATE"
#echo "Backup fájl: $BACKUPFILE.tgz"
;;
@@ -310,3 +311,5 @@ fi
#
freeup_lock
if [ $VERBOSE -gt 0 ]; then echo -e "* Backup-script vége.\n"; fi
+
+### \ No newline at end of file
diff --git a/mayor/bin/mayor b/mayor/bin/mayor
index eb50ce57..09168cc0 100755
--- a/mayor/bin/mayor
+++ b/mayor/bin/mayor
@@ -66,7 +66,6 @@ fi
shift
# A parancs végrehajtása
cd $BASEDIR/bin
-cd "/home/honlap-naplo/h002/mayor/bin"
if [ -z $UPDATELOG ]; then
. ./$CMD.sh
else
diff --git a/mayor/bin/restore.sh b/mayor/bin/restore.sh
index 8283effa..7a1195ed 100644
--- a/mayor/bin/restore.sh
+++ b/mayor/bin/restore.sh
@@ -101,7 +101,7 @@ if [ ! -e "${RREVISIONFILE}" ]; then
echo -e " A helyreállításhoz először telepíteni kell egy azonos, vagy újabb verziójú rendszert.\n"
exit 1
fi
-INST_REV=`cat $RREVISIONFILE`
+INST_REV=$(cat $RREVISIONFILE)
echo "A telepített rendszer revision száma: ${INST_REV}"
if [ ! -e "${RBACKUPFILE}" ]; then
@@ -143,7 +143,7 @@ if [ ! -e "${RREVISIONFILE}" ]; then
cleartmp
exit 5
fi
-BAK_REV=`cat $RREVISIONFILE`
+BAK_REV=$(cat $RREVISIONFILE)
echo "A mentett rendszer revision száma: ${BAK_REV}"
if [ ${BAK_REV} -gt ${INST_REV} ]; then
@@ -164,9 +164,9 @@ else
fi
# Az adatbázisok betöltése
-NAPLOUSER=`egrep 'userWrite.*=' $BASEDIR/config/module-naplo/config.php | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g"`
-NAPLOUSERREAD=`egrep 'userRead.*=' $BASEDIR/config/module-naplo/config.php | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g"`
-DBS=`$MYSQL -h$MYSQL_HOST -u $MYSQL_USER -p$MYSQL_PW -e"SHOW DATABASES"`
+NAPLOUSER=$(egrep 'userWrite.*=' $BASEDIR/config/module-naplo/config.php | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g")
+NAPLOUSERREAD=$(egrep 'userRead.*=' $BASEDIR/config/module-naplo/config.php | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g")
+DBS=$($MYSQL -h$MYSQL_HOST -u $MYSQL_USER -p$MYSQL_PW -e"SHOW DATABASES")
if [ "$RESTORE_PARENT" == "1" ]; then
FILES="mayor_naplo.sql mayor_parent.sql intezmeny_*.sql naplo_*.sql"
else
@@ -198,19 +198,19 @@ done
bNCDIR="${RTMPDIR}/restore/${DT}/config/module-naplo"
iNCDIR="${BASEDIR}/config/module-naplo"
cd ${bNCDIR}
-bDB=`grep db ${bNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | grep naplo_base | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g"`
-bUSER=`egrep 'userWrite.*=' ${bNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g"`
-bUSERREAD=`egrep 'userRead.*=' ${bNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g"`
-bPW=`egrep 'pwWrite.*=' ${bNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g"`
-bPWREAD=`egrep 'pwRead.*=' ${bNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g"`
+bDB=$(grep db ${bNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | grep naplo_base | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g")
+bUSER=$(egrep 'userWrite.*=' ${bNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g")
+bUSERREAD=$(egrep 'userRead.*=' ${bNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g")
+bPW=$(egrep 'pwWrite.*=' ${bNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g")
+bPWREAD=$(egrep 'pwRead.*=' ${bNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g")
#echo "mentett: $bDB : $bUSER : $bUSERREAD : $bPW : $bPWREAD"
# Az új telepítés user és jelszó adatai
if [ -e "${iNCDIR}/config.php" ] && [ "${KEEP_OLD_PASSWORDS}" != "1" ]; then
- iDB=`grep db ${iNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | grep naplo_base | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g"`
- iUSER=`egrep 'userWrite.*=' ${iNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g"`
- iUSERREAD=`egrep 'userRead.*=' ${iNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g"`
- iPW=`egrep 'pwWrite.*=' ${iNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g"`
- iPWREAD=`egrep 'pwRead.*=' ${iNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g"`
+ iDB=$(grep db ${iNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | grep naplo_base | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g")
+ iUSER=$(egrep 'userWrite.*=' ${iNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g")
+ iUSERREAD=$(egrep 'userRead.*=' ${iNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g")
+ iPW=$(egrep 'pwWrite.*=' ${iNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g")
+ iPWREAD=$(egrep 'pwRead.*=' ${iNCDIR}/config.php | egrep -v '^[[:space:]]*(//|/\*.*\*/$)' | sed -e "s/^.*=\ *['|\"]//g" -e "s/['|\"];//g")
else
iDB=$bDB
iUSER=$bUSER