summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/virtualbox-kvm/files/vboxwebsrv-initd')
-rw-r--r--app-emulation/virtualbox-kvm/files/vboxwebsrv-initd21
1 files changed, 21 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-kvm/files/vboxwebsrv-initd b/app-emulation/virtualbox-kvm/files/vboxwebsrv-initd
new file mode 100644
index 000000000000..f50c3ec099d6
--- /dev/null
+++ b/app-emulation/virtualbox-kvm/files/vboxwebsrv-initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting VirtualBox WebService"
+ start-stop-daemon --start --quiet --user ${VBOXWEBSRV_USER} --pidfile /var/run/vboxwebsrv.pid \
+ --background --make-pidfile --exec /usr/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 $?
+}