View Full Version : [SOLVED] how to start virtualbox using init.d

December 16th, 2010, 01:41 PM
hey guys :)

recently installed phpVirtualBox and VirtualBox on my 10.04 LTS ubuntu server

it's getting annoying having to type

/usr/bin/vboxwebsrv -b --logfile /dev/null >/dev/null every time i reboot the server

tried for hours to make an init.d script that will run it but failed... haha

basically I just want it to automatically run the above command on every boot.

hoping you guys can help me out, please?

-Much Appreciated

December 16th, 2010, 02:49 PM
Well here's a few easy commands to get it going...

sudo -i

nano /etc/init.d/vboxserver
and paste your line in...

#! /bin/bash
/usr/bin/vboxwebsrv -b --logfile /dev/null >/dev/null

chmod +x /etc/init.d/vboxserver

And add it to various runlevels

update-rc.d vboxserver defaults

Hope that helps.

December 16th, 2010, 02:50 PM
thanks man, I will see if that works now, I did everything except the last command before :)

December 16th, 2010, 02:53 PM
I just threw it in a crontab with the @reboot flag.

Found that easier then trying to make/create an init script.

December 16th, 2010, 02:54 PM
That's a great solution as well. I don't ever think to use crontab for services, but that's a quick way to do it.

December 16th, 2010, 03:43 PM
YES! You are my hero xD hahaha

thanks man!

December 16th, 2010, 04:17 PM
Great, glad to hear it. Make sure to mark the thread as [SOLVED] so that others can benefit when using the search function

December 16th, 2010, 04:19 PM
done :D