From faf3d358dc36256505f4dfe0b9d37a571308e308 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Tue, 19 Apr 2022 18:14:01 +0300 Subject: [PATCH] unbound-control-setup: check openssl Before doing anything, check if openssl binary (which we will use) is available, and print a useful error message if it is not found. --- smallapp/unbound-control-setup.sh.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/smallapp/unbound-control-setup.sh.in b/smallapp/unbound-control-setup.sh.in index eaf1d082c..90af77b38 100644 --- a/smallapp/unbound-control-setup.sh.in +++ b/smallapp/unbound-control-setup.sh.in @@ -104,6 +104,10 @@ while getopts 'd:hr' arg; do done shift $((OPTIND - 1)) +if ! command -v openssl >/dev/null; then + echo "$0 requires openssl package to be installed to generate the keys." >&2 + exit 1 +fi echo "setup in directory $DESTDIR" cd "$DESTDIR" -- 2.47.2