mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-20 20:19:39 +03:00
Make Apache wait for ‘charon send-keys’
(This is a no-op on non-Charon deployments since the ‘keys.target’ unit won't have any dependencies.)
This commit is contained in:
parent
dd7edefb2c
commit
48a0ea0513
@ -580,11 +580,12 @@ in
|
|||||||
date.timezone = "${config.time.timeZone}"
|
date.timezone = "${config.time.timeZone}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
jobs.httpd =
|
boot.systemd.services.httpd =
|
||||||
{ description = "Apache HTTPD";
|
{ description = "Apache HTTPD";
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" "fs.target" "postgresql.service" ];
|
requires = [ "keys.target" ];
|
||||||
|
after = [ "network.target" "fs.target" "postgresql.service" "keys.target" ];
|
||||||
|
|
||||||
path =
|
path =
|
||||||
[ httpd pkgs.coreutils pkgs.gnugrep ]
|
[ httpd pkgs.coreutils pkgs.gnugrep ]
|
||||||
@ -596,9 +597,7 @@ in
|
|||||||
|
|
||||||
environment =
|
environment =
|
||||||
{ PHPRC = if enablePHP then phpIni else "";
|
{ PHPRC = if enablePHP then phpIni else "";
|
||||||
|
|
||||||
TZ = config.time.timeZone;
|
TZ = config.time.timeZone;
|
||||||
|
|
||||||
} // (listToAttrs (concatMap (svc: svc.globalEnvVars) allSubservices));
|
} // (listToAttrs (concatMap (svc: svc.globalEnvVars) allSubservices));
|
||||||
|
|
||||||
preStart =
|
preStart =
|
||||||
@ -628,12 +627,9 @@ in
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
exec = "httpd -f ${httpdConf} -DNO_DETACH";
|
serviceConfig.ExecStart = "@${httpd}/bin/httpd httpd -f ${httpdConf} -DNO_DETACH";
|
||||||
|
serviceConfig.ExecStop = "${httpd}/bin/httpd -f ${httpdConf} -k graceful-stop";
|
||||||
preStop =
|
serviceConfig.Restart = "always";
|
||||||
''
|
|
||||||
${httpd}/bin/httpd -f ${httpdConf} -k graceful-stop
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -442,6 +442,11 @@ in
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Target for ‘charon send-keys’ to hook into.
|
||||||
|
boot.systemd.targets.keys =
|
||||||
|
{ description = "Security Keys";
|
||||||
|
};
|
||||||
|
|
||||||
boot.systemd.units =
|
boot.systemd.units =
|
||||||
{ "rescue.service".text = rescueService; }
|
{ "rescue.service".text = rescueService; }
|
||||||
// mapAttrs' (n: v: nameValuePair "${n}.target" (targetToUnit n v)) cfg.targets
|
// mapAttrs' (n: v: nameValuePair "${n}.target" (targetToUnit n v)) cfg.targets
|
||||||
|
Loading…
Reference in New Issue
Block a user