nixos/nginx: validate config syntax in preStart (#24664)

This commit is contained in:
Niklas Hambüchen 2018-02-17 10:45:25 +01:00 committed by Joachim F
parent 7934a0e5c5
commit f00a1514f9

View File

@ -578,6 +578,7 @@ in
mkdir -p ${cfg.stateDir}/logs
chmod 700 ${cfg.stateDir}
chown -R ${cfg.user}:${cfg.group} ${cfg.stateDir}
${cfg.package}/bin/nginx -c ${configFile} -p ${cfg.stateDir} -t
'';
serviceConfig = {
ExecStart = "${cfg.package}/bin/nginx -c ${configFile} -p ${cfg.stateDir}";