mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
nixos/tests/stunnel: ensure correct ordering w.r.t. shutdown.target
Also, mark the service as `oneshot` since it is.
This commit is contained in:
parent
d8c9b26a16
commit
88dc5ded81
@ -19,8 +19,10 @@ let
|
||||
makeCert = { config, pkgs, ... }: {
|
||||
systemd.services.create-test-cert = {
|
||||
wantedBy = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" ];
|
||||
before = [ "sysinit.target" "shutdown.target" ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
unitConfig.DefaultDependencies = false;
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
${pkgs.openssl}/bin/openssl req -batch -x509 -newkey rsa -nodes -out /test-cert.pem -keyout /test-key.pem -subj /CN=${config.networking.hostName}
|
||||
( umask 077; cat /test-key.pem /test-cert.pem > /test-key-and-cert.pem )
|
||||
|
Loading…
Reference in New Issue
Block a user