]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
unbound-control-setup: check openssl
authorMichael Tokarev <mjt@tls.msk.ru>
Tue, 19 Apr 2022 15:14:01 +0000 (18:14 +0300)
committerYorgos Thessalonikefs <yorgos@nlnetlabs.nl>
Mon, 27 May 2024 14:35:34 +0000 (16:35 +0200)
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

index eaf1d082cb765d1f90464adb2ccd1b80101f9ef0..90af77b38d09762d5e521c1827dd72a7c5a77319 100644 (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"