check that provided openssl is executable, fall back to system one if not

This commit is contained in:
Julien Vehent 2014-10-10 16:56:00 -04:00
parent 26aa8f9408
commit d5685da796
1 changed files with 6 additions and 0 deletions

View File

@ -468,6 +468,12 @@ debug "Port: $PORT"
TARGET=$HOST:$PORT
debug "target: $TARGET"
# test our openssl is usable
tmp="$($OPENSSLBIN -h 2>&1 1>/dev/null)"
if [ $? -gt 0 ]; then
OPENSSLBIN=$(which openssl)
echo "custom openssl not executable, falling back to system one from $OPENSSLBIN"
fi
SCLIENTARGS=$(sed -e s,${TEMPTARGET},,<<<"${@}")
debug "sclientargs: $SCLIENTARGS"