Why is the default Ubuntu systemd unit file for vboxweb different than the Oracle-provided one (and ignores /etc/default/virtualbox)

Asked by David Litster

Yesterday I tried to install phpvirtualbox after a hiatus from the package. I installed the virtualbox 5.2.18-dfsg-2~ubuntu18.04.3 package on a default server install of 18.04, and had trouble getting the vboxweb.service unit file to accept my environment changes to /etc/default/virtualbox (i.e. they were completely ignored)

VBOXWEB_USER=vbox
VBOXWEB_HOST=0.0.0.0

 I finally understood that some combination of systemd unit file and vboxweb itself was ignoring the default in my /etc/default/virtualbox file. I got that working after hacking /lib/systemd/system/vboxweb.service , but on a whim decided to install the official 6.0, then 5.2 packages from Oracle. Both picked up my environment variable changes flawlessly.

I then noticed that /lib/systemd/system/vboxweb-service.service (oracle) is quite different from the ubuntu package. Why is that?

UBUNTU - /lib/systemd/system/vboxweb.service
cat debian/vboxweb.service
[Unit]
Description=VirtualBox Web Service
After=network.target

[Service]
Type=forking
ExecStart=/usr/bin/vboxwebsrv --pidfile /run/vboxweb.pid --background
PIDFile=/run/vboxweb.pid

[Install]
WantedBy=multi-user.target

ORACLE - /lib/systemd/system/vboxweb.service
cat /lib/systemd/system/vboxweb-service.service
[Unit]
SourcePath=/usr/lib/virtualbox/vboxweb-service.sh
Description=
Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target
After=vboxdrv.service
Conflicts=shutdown.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/usr/lib/virtualbox/vboxweb-service.sh start
ExecStop=/usr/lib/virtualbox/vboxweb-service.sh stop

[Install]
WantedBy=multi-user.target

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu virtualbox Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

I suggest you report a bug

Can you help with this problem?

Provide an answer of your own, or ask David Litster for more information if necessary.

To post a message you must log in.