From df059f89e6b6cc50120aeabf94b1e8979dc06464 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 6 Jan 2020 20:08:51 -0500 Subject: [PATCH] nixos/mysql: restart systemd service on abort --- nixos/modules/services/databases/mysql.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index 6af32700fc7..8d520b82fb5 100644 --- a/nixos/modules/services/databases/mysql.nix +++ b/nixos/modules/services/databases/mysql.nix @@ -320,6 +320,8 @@ in Type = if hasNotify then "notify" else "simple"; RuntimeDirectory = "mysqld"; RuntimeDirectoryMode = "0755"; + Restart = "on-abort"; + RestartSec = "5s"; # The last two environment variables are used for starting Galera clusters ExecStart = "${mysql}/bin/mysqld --defaults-file=/etc/my.cnf ${mysqldOptions} $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION"; ExecStartPost =