aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2016-12-23 09:20:21 +0100
committerThomas Lange <code@nerdmind.de>2016-12-23 09:20:21 +0100
commit641a9eaf784dbc10e8aa62d2b82ae1342d6dfa84 (patch)
tree616ec032f62203295be32245efd93da9bca7fc8b
parenta6a2f4a09a0e7c3bdb876c394324347d53fe0610 (diff)
downloadpainlessle-641a9eaf784dbc10e8aa62d2b82ae1342d6dfa84.tar.gz
painlessle-641a9eaf784dbc10e8aa62d2b82ae1342d6dfa84.tar.xz
painlessle-641a9eaf784dbc10e8aa62d2b82ae1342d6dfa84.zip
Delete Certificate-Signing-Request (CSR) file which was created by mktemp on exit.
-rwxr-xr-xpainless-le.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/painless-le.sh b/painless-le.sh
index 65a4a98..3a15cd5 100755
--- a/painless-le.sh
+++ b/painless-le.sh
@@ -58,6 +58,11 @@ CERTIFICATE_ONLY="${ARGUMENT_DIRECTORY%/}/certificate_only.pem"
CERTIFICATE_FULL="${ARGUMENT_DIRECTORY%/}/certificate_full.pem"
#===============================================================================
+# Delete Certificate-Signing-Request (CSR) file on exit
+#===============================================================================
+trap 'rm ${REQUESTFILE}' EXIT
+
+#===============================================================================
# Generate Certificate-Signing-Request (CSR)
#===============================================================================
openssl req -config <(cat "${OPENSSLCONF}" <(printf "[SAN]\nsubjectAltName=DNS:`echo ${ARGUMENT_HOSTNAMES} | sed "s/:/,DNS:/g"`")) \