Don't try to move inexistant files

Signed-off-by: Xavier Bachelot <xavier@bachelot.org>
This commit is contained in:
Xavier Bachelot 2019-01-28 16:28:24 +01:00
parent 2f841e9fec
commit 8b24da13fd

View File

@ -959,7 +959,7 @@ input in file: $req_in"
# get file extension
file_ext="${file##*.}"
mv "$file" "$EASYRSA_PKI/revoked/private_by_serial/$cert_serial.$file_ext"
[ -f "$file" ] && mv "$file" "$EASYRSA_PKI/revoked/private_by_serial/$cert_serial.$file_ext"
done
# remove the dublicate certificate in the certs_by_serial folder
@ -1113,7 +1113,7 @@ input in file: $req_in"
# get file extension
file_ext="${file##*.}"
mv "$file" "$EASYRSA_PKI/renewed/private_by_serial/$cert_serial.$file_ext"
[ -f "$file" ] && mv "$file" "$EASYRSA_PKI/renewed/private_by_serial/$cert_serial.$file_ext"
done
# remove the duplicate certificate in the certs_by_serial folder