From 582aa2425ba4d01763daf80485d8d2cd7e50bcb9 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 26 Jan 2018 13:39:53 +0100 Subject: [PATCH] Remove leftovers if a cert creation failed --- dnscrypt-wrapper.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/dnscrypt-wrapper.sh b/dnscrypt-wrapper.sh index e8f02bb..d961998 100755 --- a/dnscrypt-wrapper.sh +++ b/dnscrypt-wrapper.sh @@ -26,6 +26,7 @@ new_key() { --crypt-secretkey-file="${STKEYS_DIR}/${ts}.key" \ --provider-cert-file="${STKEYS_DIR}/${ts}.cert" \ --cert-file-expire-days=1 + [ $? -ne 0 ] && rm -f "${STKEYS_DIR}/${ts}.key" "${STKEYS_DIR}/${ts}.cert" } stkeys_files() {