diff --git a/sandbox/templates/single/start.gotxt b/sandbox/templates/single/start.gotxt index b4c0126e..a6732005 100644 --- a/sandbox/templates/single/start.gotxt +++ b/sandbox/templates/single/start.gotxt @@ -3,6 +3,11 @@ # Generated by dbdeployer {{.AppVersion}} using {{.TemplateName}} on {{.DateTime}} source {{.SandboxDir}}/sb_include MYSQLD_SAFE="bin/mysqld_safe" +FLAVOR={{.Flavor}} +if [ "$FLAVOR" == "mariadb" ] +then + MYSQLD_SAFE="bin/mariadbd-safe" +fi CUSTOM_MYSQLD={{.CustomMysqld}} if [ -n "$CUSTOM_MYSQLD" ] then @@ -10,7 +15,7 @@ then fi if [ ! -f $BASEDIR/$MYSQLD_SAFE ] then - echo "mysqld_safe not found in $BASEDIR/bin/" + echo "${MYSQLD_SAFE##*/} not found in $BASEDIR/bin/" exit 1 fi MYSQLD_SAFE_OK=$(sh -n $BASEDIR/$MYSQLD_SAFE 2>&1) diff --git a/sandbox/templates/single/stop.gotxt b/sandbox/templates/single/stop.gotxt index 37edefa7..f30b0e32 100644 --- a/sandbox/templates/single/stop.gotxt +++ b/sandbox/templates/single/stop.gotxt @@ -4,7 +4,12 @@ source {{.SandboxDir}}/sb_include export LD_LIBRARY_PATH=$CLIENT_LD_LIBRARY_PATH +FLAVOR={{.Flavor}} MYSQL_ADMIN="$CLIENT_BASEDIR/bin/mysqladmin" +if [ "$FLAVOR" == "mariadb" ] +then + MYSQL_ADMIN="$CLIENT_BASEDIR/bin/mariadb-admin" +fi if [ -n "$(is_running)" ] then diff --git a/sandbox/templates/single/use.gotxt b/sandbox/templates/single/use.gotxt index fab41470..970360b6 100644 --- a/sandbox/templates/single/use.gotxt +++ b/sandbox/templates/single/use.gotxt @@ -1,10 +1,17 @@ #!{{.ShellPath}} {{.Copyright}} # Generated by dbdeployer {{.AppVersion}} using {{.TemplateName}} on {{.DateTime}} +FLAVOR={{.Flavor}} +MYCLIENT="mysql" +if [ "$FLAVOR" == "mariadb" ] +then + MYCLIENT="mariadb" +fi + source {{.SandboxDir}}/sb_include export LD_LIBRARY_PATH=$CLIENT_LD_LIBRARY_PATH [ -n "$TEST_REPL_DELAY" -a -f $SBDIR/data/mysql-relay.index ] && sleep $TEST_REPL_DELAY -[ -z "$MYSQL_EDITOR" ] && MYSQL_EDITOR="$CLIENT_BASEDIR/bin/mysql" +[ -z "$MYSQL_EDITOR" ] && MYSQL_EDITOR="$CLIENT_BASEDIR/bin/${MYCLIENT}" if [ ! -x $MYSQL_EDITOR ] then if [ -x $SBDIR/$MYSQL_EDITOR ]