From 024f2767cda8be581f40529cfb81e0587de66a3d Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Thu, 16 Nov 2023 21:24:38 +0100 Subject: [PATCH] Fixes mysql version on FreeBSD --- mysql.cf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mysql.cf b/mysql.cf index ae08db2..7915172 100644 --- a/mysql.cf +++ b/mysql.cf @@ -20,11 +20,12 @@ vars: "user" string => "mysql"; "server_pkgs" slist => {"mysql80-server"}; "client_pkgs" slist => {"mysql80-client"}; + "type" string => "mysql8"; "server_pkgs" slist => {"mariadb106-server"}, if => strcmp("$(cfg[mariadb])","true"); "client_pkgs" slist => {"mariadb106-client"}, if => strcmp("$(cfg[mariadb])","true"); + "type" string => "mariadb",if => strcmp("$(cfg[mariadb])","true"); - "type" string => "mysql8"; "service_name" string => "mysql-server"; "cfg_dir" string => "/usr/local/etc/mysql"; "cfg_file" string => "/usr/local/etc/mysql/my.cnf"; @@ -434,9 +435,12 @@ classes: vars: "table_exists" string => "mysql_$(cfg[db_name])_$(cfg[db_check_table])_exists"; methods: - "any" usebundle => mysql_table_exists(@(cfg),"$(cfg[db_check_table])"); + "any" usebundle => mysql_table_exists(@(cfg),"$(cfg[db_check_table])"), + handle=>"$(table_exists)_checked"; + "!$(table_exists)&backup_exists":: - "any" usebundle => restore_mysql_db(@(cfg),"$(file)"); + "any" usebundle => restore_mysql_db(@(cfg),"$(file)"), + depends_on=>{"$(table_exists)_checked"}; reports: }