-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathstart-virtualhere.sh
30 lines (24 loc) · 1.09 KB
/
start-virtualhere.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh -e
#
# Script used to setup and run virtualhere
ARCH=`uname -m`
if [ "$ARCH" = "x86_64" ]; then
echo "Your system architecture was identified as $ARCH. The x86_64 version of the virtualhere-client will be used."
ARCH_VR=vhusbdx86_64
elif [ "$ARCH" = "aarch64" ]; then
echo "Your system architecture was identified as $ARCH. The ARM64 version of the virtualhere-client will be used."
ARCH_VR=vhusbdarm64
else
echo "Your system architecture was identified as $ARCH. The ARM version of the virtualhere-client will be used."
ARCH_VR=vhusbdarm
fi
echo '*** Listing all usb-devices. Use this list to adjust AllowedDevices in config.ini ...'
lsusb || echo 'Execution of command lsusb failed. Make sure you have access to USB-Devices on the host.'
cd data
echo '*** Deleting previous bus_usb_*-files from data directory ...'
find . -name '*bus_usb_*' -delete
echo '*** Checking for new version of VirtualHere ...'
wget -N https://www.virtualhere.com/sites/default/files/usbserver/$ARCH_VR || echo 'Checking for remote copy of VirtualHere failed'
chmod +x ./$ARCH_VR
./$ARCH_VR
exit 0