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, ... }: {
|
makeCert = { config, pkgs, ... }: {
|
||||||
systemd.services.create-test-cert = {
|
systemd.services.create-test-cert = {
|
||||||
wantedBy = [ "sysinit.target" ];
|
wantedBy = [ "sysinit.target" ];
|
||||||
before = [ "sysinit.target" ];
|
before = [ "sysinit.target" "shutdown.target" ];
|
||||||
|
conflicts = [ "shutdown.target" ];
|
||||||
unitConfig.DefaultDependencies = false;
|
unitConfig.DefaultDependencies = false;
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.openssl}/bin/openssl req -batch -x509 -newkey rsa -nodes -out /test-cert.pem -keyout /test-key.pem -subj /CN=${config.networking.hostName}
|
${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 )
|
( umask 077; cat /test-key.pem /test-cert.pem > /test-key-and-cert.pem )
|
||||||
|
|
Loading…
Reference in a new issue