Shell script `default/mariadb-galera-cluster-restart'

MariaDB Galera Cluster: Restart a server

{% if cluster.servers | length > 1 %} sudo systemctl restart mysql && echo "MySQL is successfully restarted." {% else %} sudo systemctl stop mysql sudo rm -f /var/lib/mysql/grastate.dat sudo galera_new_cluster && echo "Galera Cluster is successfully started." {% endif %}