From 8b3ddd6fa2495cec5cab5ea308c8374c82ad9daa Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Thu, 24 Jan 2019 16:09:40 +0100 Subject: Use a variable to store the keys directory path Signed-off-by: Olivier Gayot --- sigexec.com-gen-dkim-key.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sigexec.com-gen-dkim-key.sh') diff --git a/sigexec.com-gen-dkim-key.sh b/sigexec.com-gen-dkim-key.sh index d9aa9e1..3dae486 100755 --- a/sigexec.com-gen-dkim-key.sh +++ b/sigexec.com-gen-dkim-key.sh @@ -1,5 +1,9 @@ #!/bin/bash +# Debian uses the /etc/dkimkeys/ directory but the upstream recommends using +# /var/db/dkim/. +key_directory=/etc/dkimkeys/sigexec.com/ + if [ $# -lt 1 ]; then >&2 echo "Usage: $0 selector" exit 1 @@ -7,9 +11,9 @@ fi selector=$1 -mkdir --parents /etc/dkimkeys/sigexec.com/ +mkdir --parents -- "${key_directory}" opendkim-genkey \ - -D /etc/dkimkeys/sigexec.com/ \ + -D "${key_directory}" \ -d sigexec.com \ -s "$selector" \ -r -- cgit v1.2.3