summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-01-09 17:04:40 +0100
committerGitHub <noreply@github.com>2020-01-09 17:04:40 +0100
commit5a523d70f6537c292ebb8b6acb0716afde210736 (patch)
tree450df1ffb54e194bbeed8323f8c53bebd4befc03 /nixos
parent462fcf3381540ae7c1f3ed93a47bb61ebe99a8a2 (diff)
parentdf059f89e6b6cc50120aeabf94b1e8979dc06464 (diff)
downloadnixpkgs-5a523d70f6537c292ebb8b6acb0716afde210736.tar
nixpkgs-5a523d70f6537c292ebb8b6acb0716afde210736.tar.gz
nixpkgs-5a523d70f6537c292ebb8b6acb0716afde210736.tar.bz2
nixpkgs-5a523d70f6537c292ebb8b6acb0716afde210736.tar.lz
nixpkgs-5a523d70f6537c292ebb8b6acb0716afde210736.tar.xz
nixpkgs-5a523d70f6537c292ebb8b6acb0716afde210736.tar.zst
nixpkgs-5a523d70f6537c292ebb8b6acb0716afde210736.zip
Merge pull request #77158 from aanderse/mysql
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 =