#!/bin/bash



#check if mysql55 is instelled and enabled, if yes expand sql/init55 and restar mysql55-mysql.init

status55=`/sbin/e-smith/db configuration getprop mysql55-mysqld status|| echo "disabled"`

if [ $status55 == "enabled" ]; then

        /sbin/e-smith/expand-template /etc/e-smith/sql/init55/automysqlbackup
        /sbin/e-smith/service mysql55-mysql.init restart

fi

#check if mysql57 is installed and enabled, if yes expand sql/init57 and restar mysql57-mysql.init
status57=`/sbin/e-smith/db configuration getprop mysql57-mysqld status|| echo "disabled"`

if [ $status57 == "enabled" ]; then

        /sbin/e-smith/expand-template /etc/e-smith/sql/init57/automysqlbackup
        /sbin/e-smith/service mysql57-mysql.init restart

fi

