1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-01 23:57:05 +00:00

Create temporary file in TMP not the current working directory

This commit is contained in:
downtownallday 2024-04-03 12:51:22 -04:00
parent 95f23961dc
commit c9c0a51be2

View File

@ -152,7 +152,7 @@ fi
# so we can offer the user a control panel to install a better certificate.
if [ ! -f "$STORAGE_ROOT/ssl/ssl_certificate.pem" ]; then
# Generate a certificate signing request.
CSR="$(mktemp XXXXXXXXXX.csr)"
CSR="$(mktemp --tmpdir XXXXXXXXXX.csr)"
hide_output \
openssl req -new -key "$STORAGE_ROOT/ssl/ssl_private_key.pem" -out "$CSR" \
-sha256 -subj "/CN=$PRIMARY_HOSTNAME"