mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-08 11:35:37 +03:00
nginx service improvements
Adding Restart, RestartSec, StartLimitInterval to ensure that the service is started in case if it can't assign (bind) the address as often it takes longer for the network (e.g. dhcpcd) to get the IP assigned.
This commit is contained in:
parent
c163baca3b
commit
b1b9efdbe1
1 changed files with 3 additions and 0 deletions
|
@ -102,6 +102,9 @@ in
|
|||
'';
|
||||
serviceConfig = {
|
||||
ExecStart = "${nginx}/bin/nginx -c ${configFile} -p ${cfg.stateDir}";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10s";
|
||||
StartLimitInterval = "1min";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue