summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAaron Andersen <aaron@fosslib.net>2020-01-06 20:08:51 -0500
committerAaron Andersen <aaron@fosslib.net>2020-01-06 20:08:51 -0500
commitdf059f89e6b6cc50120aeabf94b1e8979dc06464 (patch)
tree17a4144a3ca88499eb1670f8cf9a449e8530ad74 /nixos
parentcca0c894a13ec398de8b046174239513197f5c74 (diff)
downloadnixpkgs-df059f89e6b6cc50120aeabf94b1e8979dc06464.tar
nixpkgs-df059f89e6b6cc50120aeabf94b1e8979dc06464.tar.gz
nixpkgs-df059f89e6b6cc50120aeabf94b1e8979dc06464.tar.bz2
nixpkgs-df059f89e6b6cc50120aeabf94b1e8979dc06464.tar.lz
nixpkgs-df059f89e6b6cc50120aeabf94b1e8979dc06464.tar.xz
nixpkgs-df059f89e6b6cc50120aeabf94b1e8979dc06464.tar.zst
nixpkgs-df059f89e6b6cc50120aeabf94b1e8979dc06464.zip
nixos/mysql: restart systemd service on abort
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/databases/mysql.nix2
1 files changed, 2 insertions, 0 deletions
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 =