Changes

From Amahi Wiki
Jump to: navigation, search
561 bytes removed ,  04:27, 4 December 2010
As '''root''' user, create the file '''''/etc/init.d/vboxwebsrv''''' and add the following:
#! /bin/sh
# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/usr/sbin:/usr/bin:/sbin:/bin
DESC="VirtualBox Web Service"
SCRIPTNAME=/etc/init.d/$NAME
USER=username
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Load the VERBOSE setting and other rcS variables
[ -f /etc/default/rcS ] && . /etc/default/rcS
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /etc/rc.d/init.d/functions
VBPID=`ps -U ${USER} --no-heading -o pid,cmd | grep vboxwebsrv | grep -v ${SCRIPTNAME} | grep -v grep | tail -1 | awk '{ print $1 }'`
# | tail -1 | awk '{ print $1 }'`
# Function that starts the daemon/service
#
do_start()
{
fi
}
#
# Function that stops the daemon/service
#
do_stop()
{
fi
}
#
# Display "State" field from showinfo action
#
do_status()
{
;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
echo "Restarting $DESC" "$NAME"
do_stop
12,424

edits