summaryrefslogtreecommitdiff
path: root/app-emulation/virtualbox/files/vboxwebsrv-initd
blob: e6009970135289238bd48fcc69f3cdf2e0819c0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

depend() {
	need net
}

start() {
	#checkconfig || return $?

	ebegin "Starting VirtualBox WebService"
	start-stop-daemon --start --quiet --user ${VBOXWEBSRV_USER} --pidfile /var/run/vboxwebsrv.pid \
		--background --make-pidfile --exec /opt/bin/vboxwebsrv \
		-- -H ${VBOXWEBSRV_HOST} -p ${VBOXWEBSRV_PORT} -t ${VBOXWEBSRV_TIMEOUT} -i ${VBOXWEBSRV_INTERVAL}
	eend $?
}

stop() {
        ebegin "Stopping VirtualBox WebService"
        start-stop-daemon --stop --user ${VBOXWEBSRV_USER} --quiet --pidfile /var/run/vboxwebsrv.pid
        eend $?
}