From e68f4caade95faa9949d91751f4660c738ea52ac Mon Sep 17 00:00:00 2001 From: Kamil Aronowski Date: Tue, 1 Aug 2023 15:01:34 +0200 Subject: make-certs: Handle missing OpenSSL installation If there is no OpenSSL installation on the system, where the `make-certs` script is run at, no error message will be shown; instead the script will fail silently and no certificates will be generated. This change introduces a simple check, if the `openssl` binary is present and informs the user, if it's missing, shortening debugging time from minutes to mere seconds. A bashism has been used so a pretty message gets printed without moving the check to a section before `set -e`. Signed-off-by: Kamil Aronowski --- make-certs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/make-certs b/make-certs index 6f40b234..e2d3e4b4 100755 --- a/make-certs +++ b/make-certs @@ -7,6 +7,11 @@ set -e +if [[ ! -f `which openssl` ]]; then + echo "OpenSSL not found. Install it first, then run this script again." + exit 1 +fi + DOMAIN=xn--u4h.net DAYS=365 KEYTYPE=RSA -- cgit v1.2.3