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