summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Raymond <robin@robinraymond.de>2018-02-23 14:56:28 +0100
committerRobin Raymond <robin@robinraymond.de>2018-02-23 14:56:28 +0100
commit5d169c3ef29fcff2951b107a9fd2bd9e7b16c2fe (patch)
tree11ffd20a1f646acd0d58836a045af9f8e24da4e3
parenta3043b224226f5fd1694c2fdd76379ffbbf13363 (diff)
fixes #88v2.1.2
-rw-r--r--mail-server/systemd.nix10
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: