Update restore.sh
This commit is contained in:
parent
7afff39e74
commit
3dd4b7644d
|
@ -11,6 +11,12 @@ MYDATA='/var/lib/mysql'
|
||||||
if [ ! -n "$BASH" ] ;then echo Please run this script $0 with bash; exit 1; fi
|
if [ ! -n "$BASH" ] ;then echo Please run this script $0 with bash; exit 1; fi
|
||||||
|
|
||||||
# === FUNCTIONS ===
|
# === 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()
|
database_exists()
|
||||||
{
|
{
|
||||||
RESULT=`mysqlshow --defaults-extra-file=$MYCNF $@| grep -v Wildcard | grep -o $@`
|
RESULT=`mysqlshow --defaults-extra-file=$MYCNF $@| grep -v Wildcard | grep -o $@`
|
||||||
|
|
Loading…
Reference in a new issue