Created
October 22, 2012 14:48
-
-
Save noxqsgit/3931842 to your computer and use it in GitHub Desktop.
vbox launchd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>nl.noxqslabs.vbox</string> | |
<key>Disabled</key> | |
<false/> | |
<key>KeepAlive</key> | |
<dict> | |
<key>SuccessfulExit</key> | |
<false/> | |
</dict> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>UserName</key> | |
<string>noxqs</string> | |
<key>WorkingDirectory</key> | |
<string>/Users/noxqs</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/noxqs/vbox/vbox.sh</string> | |
</array> | |
</dict> | |
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
vm=ubus1 | |
function stop_vm () { | |
VBoxManage controlvm "$vm" savestate | |
exit 0 | |
} | |
trap stop_vm SIGTERM | |
VBoxHeadless --startvm "$vm" & | |
wait $! | |
# -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment