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
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue