aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'wrap.sh')
-rwxr-xr-xwrap.sh13
1 files changed, 5 insertions, 8 deletions
diff --git a/wrap.sh b/wrap.sh
index 9a2cc65..8b5da72 100755
--- a/wrap.sh
+++ b/wrap.sh
@@ -1,11 +1,8 @@
#!/bin/bash
-# this is a dirty hack that will be disappearing soon
-# just saves me restarting the daemon every time i want to change something
-
cd /usr/share/websockify
-MEMORY=512
-DISP=$(( ${2}-5900 ))
-DISP2=$(( ${2}+1000 ))
-qemu -hda $1 -m ${MEMORY} -net nic -net user -vnc :$DISP -usbdevice tablet &
-websockify -D ${DISP2} 127.0.0.1:${2}
+MEMORY=${3}
+VNCDISPLAY=$(( ${2}-5900 ))
+RPORT=$(( ${2}+1000 ))
+qemu -hda $1 -m ${MEMORY} -net nic -net user -vnc :$VNCDISPLAY -usbdevice tablet &
+websockify -D ${RPORT} 127.0.0.1:${2}