nixos/mysql: make ExecStartPost script fail on error

This commit is contained in:
Thorsten Weber 2019-07-03 08:50:21 +02:00
parent b7907dc1ae
commit 46ea3ebc19

View File

@ -319,7 +319,9 @@ in
ExecStart = "${mysql}/bin/mysqld --defaults-file=/etc/my.cnf ${mysqldOptions} $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION";
ExecStartPost =
let
setupScript = pkgs.writeShellScript "mysql-setup" ''
setupScript = pkgs.writeScript "mysql-setup" ''
#!${pkgs.runtimeShell} -e
${optionalString (!hasNotify) ''
# Wait until the MySQL server is available for use
count=0