X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=handlers%2Fmysql.helper;h=b7efe99d4455408a1354812478b1bb2dd95e10e5;hb=ca8ae79915bb9c891e2f6b5a3094ebfd3303442b;hp=759ee262f13ef48b2a7abebbf97dc03be4e75761;hpb=67b5cf70d7a48bf9333e448b0d1ca53aacc252ea;p=matthijs%2Fupstream%2Fbackupninja.git diff --git a/handlers/mysql.helper b/handlers/mysql.helper index 759ee26..b7efe99 100644 --- a/handlers/mysql.helper +++ b/handlers/mysql.helper @@ -2,13 +2,16 @@ HELPERS="$HELPERS mysql:mysql_database_backup" do_mysql_user() { inputBox "mysql action wizard" "specify a system user:" + [ $? = 1 ] && return do_mysql_final "user = $REPLY" } do_mysql_password() { inputBox "mysql action wizard" "specify a mysql user:" + [ $? = 1 ] && return user=$REPLY inputBox "mysql action wizard" "specify the mysql user's password:" + [ $? = 1 ] && return password=$REPLY do_mysql_final "dbusername = $user\ndbpassword = $password" } @@ -20,34 +23,35 @@ do_mysql_debian() { do_mysql_user() { inputBox "mysql action wizard" "what system user does mysql backup use?" + [ $? = 1 ] && return do_mysql_final "user = $REPLY" } do_mysql_final() { if [ -z "$_DISABLE_HOTCOPY" ]; then checkBox "mysql action wizard" "check options" \ - "sqldump" "create a backup using mysqldump (more compat)." off \ - "hotcopy" "create a backup using mysqlhotcopy (faster)." on \ - "compress" "compress the sql output files" on + "sqldump" "create a backup using mysqldump (more compat)." no \ + "hotcopy" "create a backup using mysqlhotcopy (faster)." yes \ + "compress" "compress the sql output files" yes status=$? - sqldump="sqldump = off" - hotcopy="hotcopy = off" + sqldump="sqldump = no" + hotcopy="hotcopy = no" else checkBox "mysql action wizard" "check options" \ - "compress" "compress the sql output files" on + "compress" "compress the sql output files" yes status=$? - sqldump="sqldump = on" - hotcopy="hotcopy = off" + sqldump="sqldump = yes" + hotcopy="hotcopy = no" fi [ $status = 1 ] && return; result="$REPLY" - compress="compress = off" + compress="compress = no" for opt in $result; do case $opt in - '"sqldump"') sqldump="sqldump = on";; - '"hotcopy"') hotcopy="hotcopy = on";; - '"compress"') compress="compress = on";; + '"sqldump"') sqldump="sqldump = yes";; + '"hotcopy"') hotcopy="hotcopy = yes";; + '"compress"') compress="compress = yes";; esac done get_next_filename $configdirectory/20.mysql @@ -60,7 +64,7 @@ $compress # backupdir = /var/backups/mysql # dbhost = localhost EOF - chmod 000 $next_filename + chmod 600 $next_filename } mysql_wizard() {