|
Revision 107, 1.2 KB
(checked in by kfitzgerald, 3 years ago)
|
|
Added source for VBoxVentriloControl for using ventrilo inside a virtualbox virtual machine
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | # |
|---|
| 3 | # This script sends your running VirtualBox VM some keyscan codes to toggle your |
|---|
| 4 | # Ventrilo transmissions |
|---|
| 5 | # |
|---|
| 6 | # By Kevin Fitzgerald - kevin@kevinfitzgerald.net |
|---|
| 7 | # |
|---|
| 8 | # $Id$ |
|---|
| 9 | # $Url$ |
|---|
| 10 | # |
|---|
| 11 | |
|---|
| 12 | # Load the configuration |
|---|
| 13 | . ./config.sh |
|---|
| 14 | |
|---|
| 15 | # Check what to dotransmit|complete |
|---|
| 16 | if [ "$1" == "transmit" ]; then |
|---|
| 17 | |
|---|
| 18 | # |
|---|
| 19 | # Send the transmission |
|---|
| 20 | # |
|---|
| 21 | |
|---|
| 22 | if [ "$(whoami)" != "$VBoxUsername" ]; then |
|---|
| 23 | # Attempt to sudo if the executing user is not the virtualbox user |
|---|
| 24 | sudo -u $VBoxUsername VBoxManage controlvm $VBoxMachineName keyboardputscancode $PressKeyScanCodes > /dev/null |
|---|
| 25 | else |
|---|
| 26 | VBoxManage controlvm $VBoxMachineName keyboardputscancode $PressKeyScanCodes > /dev/null |
|---|
| 27 | fi |
|---|
| 28 | |
|---|
| 29 | elif [ "$1" == "complete" ]; then |
|---|
| 30 | |
|---|
| 31 | # |
|---|
| 32 | # End the transmission |
|---|
| 33 | # |
|---|
| 34 | |
|---|
| 35 | if [ "$(whoami)" != "$VBoxUsername" ]; then |
|---|
| 36 | # Attempt to sudo if the executing user is not the virtualbox user |
|---|
| 37 | sudo -u $VBoxUsername VBoxManage controlvm $VBoxMachineName keyboardputscancode $ReleaseKeyScanCodes > /dev/null |
|---|
| 38 | else |
|---|
| 39 | VBoxManage controlvm $VBoxMachineName keyboardputscancode $ReleaseKeyScanCodes > /dev/null |
|---|
| 40 | fi |
|---|
| 41 | |
|---|
| 42 | else |
|---|
| 43 | |
|---|
| 44 | # Display usage |
|---|
| 45 | echo "USAGE: $0 <transmit|complete>" |
|---|
| 46 | |
|---|
| 47 | fi |
|---|