forked from axeman/erpnext-nix
module: restart max 5 times, set higher timeout
for initial start
This commit is contained in:
parent
57ed0da017
commit
32bb022df7
|
@ -322,9 +322,14 @@ in
|
||||||
environment = {
|
environment = {
|
||||||
PYTHON_PATH = "${penv}/${pkgs.python3.sitePackages}";
|
PYTHON_PATH = "${penv}/${pkgs.python3.sitePackages}";
|
||||||
};
|
};
|
||||||
|
unitConfig = {
|
||||||
|
StartLimitBurst = "5";
|
||||||
|
StartLimitIntervalSec = "30";
|
||||||
|
};
|
||||||
serviceConfig = defaultServiceConfig // {
|
serviceConfig = defaultServiceConfig // {
|
||||||
TimeoutStartSec = "300s";
|
TimeoutStartSec = "600s";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
RestartSec = "5s";
|
||||||
ExecStartPre = assert cfg.adminPasswordFile != null && cfg.database.rootPasswordFile != null; pkgs.writeScript "erpnext-web-init" ''
|
ExecStartPre = assert cfg.adminPasswordFile != null && cfg.database.rootPasswordFile != null; pkgs.writeScript "erpnext-web-init" ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if ! test -e ${escapeShellArg "${cfg.workDir}/.db-created"}; then
|
if ! test -e ${escapeShellArg "${cfg.workDir}/.db-created"}; then
|
||||||
|
|
Loading…
Reference in a new issue