xxtbg / vboxweb

Automatically exported from code.google.com/p/vboxweb
MIT License
0 stars 0 forks source link

Linux init script missing #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use VirtualBox 3.2.2 on Ubuntu server (10.04 - lucid)
2. Install vboxweb as explained in wiki

I configured VirtualBox to run virtual machine at startup (using vboxtools)
and now I want to use vboxweb as soon server starts. I tried, but I still
haven't written one by myself.

Original issue reported on code.google.com by luka.lod...@gmail.com on 7 Jun 2010 at 1:38

GoogleCodeExporter commented 9 years ago
P.S.: It is not Defect but Enhancement.

Original comment by luka.lod...@gmail.com on 7 Jun 2010 at 1:40

GoogleCodeExporter commented 9 years ago
Since I don't know Python well enough to deamonize vboxweb for real in Python, 
I have written small workaround in bash, using start-stop-daemon command. 
Tested in Ubuntu Server 10.04. 

Download both files from attachment and place vboxweb file in webUI install 
folder and place vboxwebinit in /etc/init.d/. Then make both files executable. 
In vboxweb change variable HOME_DIR to your webUI install folder.
Use that command to autostart:     sudo update-rc.d vboxwebinit defaults 98 02

Original comment by luka.lod...@gmail.com on 23 Jun 2010 at 7:07

Attachments:

GoogleCodeExporter commented 9 years ago
Also vboxtools are required, or just their config file in 
/etc/vboxtool/vboxtool.conf which should include that:

vbox_user='your_username'

Original comment by luka.lod...@gmail.com on 23 Jun 2010 at 7:09

GoogleCodeExporter commented 9 years ago
Very useful indeed.

The following improved vboxwebinit also manages what your vboxweb script did, 
except it doesn't (yet) redirect the output to a file.
That's to say it manages the HOME_DIR, which I renamed to VBOXWEB_DIR and I 
read it from /etc/vboxtool/vboxtool.conf as well and changes to this directory 
before starting the "daemon".

Hope it helps.

I feel there is still need to store the pidfile to /var/run at some point 
instead of the directory.
I also would rather try to use the Python libraries present on the system 
rather than those shipped in the vboxweb sources.

Original comment by warn...@gmail.com on 21 Jul 2010 at 7:06

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for improving that script. Yes, I know that pid files should be in 
/var/run, but since it has to be run by some other user, who hasn't got 
permissions to write there it is impossible.
But I don't understand anthing about Python libraries. I hope I'll have some 
time to publish my newer and a bit updated version.

Original comment by luka.lod...@gmail.com on 21 Jul 2010 at 7:19

GoogleCodeExporter commented 9 years ago
I have modified and enhanced init scripts pretty much, so I have decided to 
post the newer version here. Config file is not in /etc/vboxweb/vboxtool.conf, 
but in /etc/vboxweb.conf, which should look like this:
    vbox_user='youruser'
    vboxweb_install_dir='/path/to/vboxweb'
Pid file is now in /var/run/vboxweb.pid. Vboxwebinit is renamed to vboxweb and 
vboxweb to VBoxWeb.sh.
Now you should copy vboxweb to /etc/init.d/ and VBoxWeb.sh to your vboxweb 
install folder and then execute:
sudo update-rc.d vboxweb defaults 98 02

Original comment by luka.lod...@gmail.com on 24 Jul 2010 at 7:45

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by achim.ha...@gmail.com on 26 Aug 2010 at 2:18