1
0
Fork 0
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:
Andrey Arapov 2015-01-19 10:46:45 +01:00
parent c163baca3b
commit b1b9efdbe1

View file

@ -102,6 +102,9 @@ in
'';
serviceConfig = {
ExecStart = "${nginx}/bin/nginx -c ${configFile} -p ${cfg.stateDir}";
Restart = "on-failure";
RestartSec = "10s";
StartLimitInterval = "1min";
};
};