Update restore.sh

This commit is contained in:
mirocow 2015-12-24 17:31:02 +04:00
parent 7afff39e74
commit 3dd4b7644d

View file

@ -11,6 +11,12 @@ MYDATA='/var/lib/mysql'
if [ ! -n "$BASH" ] ;then echo Please run this script $0 with bash; exit 1; fi
# === FUNCTIONS ===
if [ -f '/etc/debian_version' ]; then
CONFIG_FILE='/etc/mysql/debian.cnf'
else
CONFIG_FILE='~/mysql_utils/etc/mysql/debian.cnf'
fi
database_exists()
{
RESULT=`mysqlshow --defaults-extra-file=$MYCNF $@| grep -v Wildcard | grep -o $@`