From 5cf9fdd93eb4c3a70ace78462d6423914af75323 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 11 Jun 2017 10:17:45 +0100 Subject: [PATCH] Try to keep mariadb running --- src/freedombone-utils-database | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/freedombone-utils-database b/src/freedombone-utils-database index 377fbc9d..4810f9d2 100755 --- a/src/freedombone-utils-database +++ b/src/freedombone-utils-database @@ -177,6 +177,10 @@ function install_mariadb { systemctl daemon-reload systemctl restart mariadb + # mariadb daemon seems to occasionally crash + # This is a crude attempt to keep it running + add_watchdog_daemon mariadb + run_query mysql "CREATE USER 'root@localhost' IDENTIFIED BY '${MARIADB_PASSWORD}'; flush privileges;" run_query mysql "update mysql.user set plugin = '' where User='root@localhost'; flush privileges;" run_query mysql "GRANT ALL PRIVILEGES ON * TO 'root@localhost'; flush privileges;"