diff options
author | Robin Raymond <robin@robinraymond.de> | 2018-02-23 14:56:28 +0100 |
---|---|---|
committer | Robin Raymond <robin@robinraymond.de> | 2018-02-23 14:56:28 +0100 |
commit | 5d169c3ef29fcff2951b107a9fd2bd9e7b16c2fe (patch) | |
tree | 11ffd20a1f646acd0d58836a045af9f8e24da4e3 | |
parent | a3043b224226f5fd1694c2fdd76379ffbbf13363 (diff) |
fixes #88v2.1.2
-rw-r--r-- | mail-server/systemd.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mail-server/systemd.nix b/mail-server/systemd.nix index a59e8ce..e009f44 100644 --- a/mail-server/systemd.nix +++ b/mail-server/systemd.nix @@ -41,9 +41,13 @@ let createDhParameterFile = '' # Create a dh parameter file - ${pkgs.openssl}/bin/openssl \ - dhparam ${builtins.toString cfg.dhParamBitLength} \ - > "${cfg.certificateDirectory}/dh.pem" + if [ ! -f "''${cfg.certificateDirectory}/dh.pem" ] + then + mkdir -p "${cfg.certificateDirectory}" + ${pkgs.openssl}/bin/openssl \ + dhparam ${builtins.toString cfg.dhParamBitLength} \ + > "${cfg.certificateDirectory}/dh.pem" + fi ''; createDomainDkimCert = dom: |