diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2019-01-24 16:09:40 +0100 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2019-01-24 16:09:40 +0100 |
commit | 8b3ddd6fa2495cec5cab5ea308c8374c82ad9daa (patch) | |
tree | 834275f60548f2f5991b738d642f93462ba9a0dc /sigexec.com-gen-dkim-key.sh | |
parent | 2fe2e3c32178824afcb8df04d98821c9e684d2b7 (diff) |
Use a variable to store the keys directory path
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'sigexec.com-gen-dkim-key.sh')
-rwxr-xr-x | sigexec.com-gen-dkim-key.sh | 8 |
1 files changed, 6 insertions, 2 deletions
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 |