Check for the websockify binary in both the PATH (using which) and in the location where the Snap package places the binary. This is necessary for noVNC to be usable in a Snap. It doesn't affect the original functionality of git clon'ing websockify if it's not found in PATH or the Snap location
This commit is contained in:
parent
9f46732090
commit
d23317da5d
|
|
@ -128,9 +128,12 @@ if [[ -e ${HERE}/websockify ]]; then
|
|||
|
||||
echo "Using local websockify at $WEBSOCKIFY"
|
||||
else
|
||||
WEBSOCKIFY=$(which websockify 2>/dev/null)
|
||||
WEBSOCKIFY_FROMSYSTEM=$(which websockify 2>/dev/null)
|
||||
WEBSOCKIFY_FROMSNAP=/snap/bin/novnc.websockify
|
||||
[ -f $WEBSOCKIFY_FROMSYSTEM ] && WEBSOCKIFY=$WEBSOCKIFY_FROMSYSTEM
|
||||
[ -f $WEBSOCKIFY_FROMSNAP ] && WEBSOCKIFY=$WEBSOCKIFY_FROMSNAP
|
||||
|
||||
if [[ $? -ne 0 ]]; then
|
||||
if [ ! -f "$WEBSOCKIFY" ]; then
|
||||
echo "No installed websockify, attempting to clone websockify..."
|
||||
WEBSOCKIFY=${HERE}/websockify/run
|
||||
git clone https://github.com/novnc/websockify ${HERE}/websockify
|
||||
|
|
|
|||
Loading…
Reference in New Issue