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.
This commit is contained in:
Michael Tokarev 2022-04-19 18:14:01 +03:00 committed by Yorgos Thessalonikefs
parent f5a2160ba3
commit faf3d358dc

View File

@ -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"