opendkim: don't recreate keys if private key is present

This commit is contained in:
Lionello Lunesu 2021-10-24 15:46:44 -07:00 committed by lewo
parent a13526a6e3
commit 6e8142862f
1 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ let
dkim_txt = "${cfg.dkimKeyDirectory}/${dom}.${cfg.dkimSelector}.txt"; dkim_txt = "${cfg.dkimKeyDirectory}/${dom}.${cfg.dkimSelector}.txt";
in in
'' ''
if [ ! -f "${dkim_key}" ] || [ ! -f "${dkim_txt}" ] if [ ! -f "${dkim_key}" ]
then then
${pkgs.opendkim}/bin/opendkim-genkey -s "${cfg.dkimSelector}" \ ${pkgs.opendkim}/bin/opendkim-genkey -s "${cfg.dkimSelector}" \
-d "${dom}" \ -d "${dom}" \