forked from ungleich-public/cdist
Merge pull request #674 from darko-poljak/fix-letsencrypt-tempfile
Fix temp file location and removal
This commit is contained in:
commit
4cee4abf7b
1 changed files with 2 additions and 1 deletions
|
@ -16,7 +16,7 @@ case "${state}" in
|
||||||
;;
|
;;
|
||||||
present)
|
present)
|
||||||
domain_param_file="${__object}/parameter/domain"
|
domain_param_file="${__object}/parameter/domain"
|
||||||
requested_domains=$(mktemp domain.cdist.XXXXXXXXXX)
|
requested_domains=$(mktemp "${TMPDIR:-/tmp}/domain.cdist.XXXXXXXXXX")
|
||||||
if [ -f "${domain_param_file}" ]; then
|
if [ -f "${domain_param_file}" ]; then
|
||||||
cp "${domain_param_file}" "${requested_domains}"
|
cp "${domain_param_file}" "${requested_domains}"
|
||||||
else
|
else
|
||||||
|
@ -66,6 +66,7 @@ case "${state}" in
|
||||||
echo "--domain '${domain}' \\"
|
echo "--domain '${domain}' \\"
|
||||||
done < "${requested_domains}")
|
done < "${requested_domains}")
|
||||||
EOF
|
EOF
|
||||||
|
rm -f "${requested_domains}"
|
||||||
|
|
||||||
if [ "${certificate_exists}" = "no" ]; then
|
if [ "${certificate_exists}" = "no" ]; then
|
||||||
echo create >> "${__messages_out}"
|
echo create >> "${__messages_out}"
|
||||||
|
|
Loading…
Reference in a new issue