smf-vboxwebsrv.sh revision fecf6ed6bcd1186078b5b49423a73c9da7ef2c3b
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Copyright (C) 2008 Sun Microsystems, Inc.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# This file is part of VirtualBox Open Source Edition (OSE), as
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# available from http://www.virtualbox.org. This file is free software;
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# you can redistribute it and/or modify it under the terms of the GNU
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# General Public License (GPL) as published by the Free Software
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Foundation, in version 2 as it comes in the "COPYING" file of the
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Clara, CA 95054 USA or visit http://www.sun.com if you need
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# additional information or have any questions.
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# smf-vboxwebsrv method
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster# Argument is the method name (start, stop, ...)
0a99555401a033704f1f171baab6db11fb5528f2Allan Foster echo "ERROR: /opt/VirtualBox/vboxwebsrv does not exist."
79943d71bcf8d4933e74f29a1b0e87f8898508cbPeter Major echo "ERROR: /opt/VirtualBox/vboxwebsrv does not exist."
79943d71bcf8d4933e74f29a1b0e87f8898508cbPeter Major if [ ! -f /opt/VirtualBox/etc/webservice.cfg ]; then
79943d71bcf8d4933e74f29a1b0e87f8898508cbPeter Major echo "ERROR: /opt/VirtualBox/etc/webservice.cfg does not exist."
79943d71bcf8d4933e74f29a1b0e87f8898508cbPeter Major [ -z "$VW_PORT" -o "$VW_PORT" -eq 0 ] && VW_PORT=18083
79943d71bcf8d4933e74f29a1b0e87f8898508cbPeter Major su "$VW_USER" -c "LOGNAME=\"$VW_USER\" USER=\"$VW_USER\" /opt/VirtualBox/vboxwebsrv --background --host \"$VW_HOST\" --port \"$VW_PORT\""
5deb404a3d276c42ef3e4adef5e584211ab1e8ddjeff.schenk echo "vboxwebsrv failed with $VW_EXIT."
exit $VW_EXIT