-
Notifications
You must be signed in to change notification settings - Fork 8
/
start-virtualhere.sh
28 lines (22 loc) · 939 Bytes
/
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
#!/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
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