Use bash's type command to find websockify

Our snap package requires bash to run novnc_proxy, but it doesn't
explicitly set a requirement for the which command to be installed.
Let's therefore use a bash built-in when looking for the websockify
binary.
This commit is contained in:
Alexander Zeijlon
2025-10-20 14:23:17 +02:00
parent eaf5b704d8
commit 71d0bfaccd

View File

@@ -181,7 +181,7 @@ if [[ -d ${HERE}/websockify ]]; then
echo "Using local websockify at $WEBSOCKIFY"
else
WEBSOCKIFY_FROMSYSTEM=$(which websockify 2>/dev/null)
WEBSOCKIFY_FROMSYSTEM=$(type -P websockify 2>/dev/null)
[ -f $WEBSOCKIFY_FROMSYSTEM ] && WEBSOCKIFY=$WEBSOCKIFY_FROMSYSTEM
if [ ! -f "$WEBSOCKIFY" ]; then