Seems TMPDIR doesn't exist
This commit is contained in:
parent
a5ed6cc504
commit
e132ba1a2a
11
dkim.nix
11
dkim.nix
|
@ -10,13 +10,14 @@ let
|
|||
dkimTxt = "${keyDir}/${domain}.mail.txt";
|
||||
in ''
|
||||
if [ ! -f "${dkimKey}" ] || [ ! -f ${dkimTxt} ]; then
|
||||
OUT=$(${pkgs.coreutils}/bin/mktemp -d -t dkim-XXXXXXXXXX)
|
||||
opendkim-genkey \
|
||||
-s mail \
|
||||
-d ${domain} \
|
||||
--selector=mail \
|
||||
--domain=${domain} \
|
||||
--bits="${toString cfg.key-bits}" \
|
||||
--directory=$TMPDIR
|
||||
mv $TMPDIR/mail.private ${dkimKey}
|
||||
mv $TMPDIR/mail.txt ${dkimTxt}
|
||||
--directory=$OUT
|
||||
mv $OUT/mail.private ${dkimKey}
|
||||
mv $OUT/mail.txt ${dkimTxt}
|
||||
fi
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in New Issue