#!/bin/sh

##
# WebCrossing Internet Server OSX Startup Scripts
#
# These files are provided as a convenience and guide only
# and are not supported by Web Crossing Inc. (WCI)
# nor is WCI responsible for their use or any problems
# that may arise from their use.
#
# cd to "/system/Library/StartupItems" and place the TAR file there.
# untar the distribution with "sudo tar xvf WebCrossingStartup.tar"
# 
# Many of the following commands require you execute
# them as a root user (ie: using sudo) from the Terminal
# so be sure you know what you are doing!
#
# Change all "cd /webx/" references here to the full path 
# of your particular Web Crossing installation. If you do not
# do this then nothing will work!
#
# If you didn't untar this using the contained directory structure,
# then create a directory named "WebCrossing" inside
# "/system/Library/StartupItems"
#
# Place this file (named "WebCrossing") and ":StartupParameters.plist"
# inside the newly created "/system/Library/StartupItems/WebCrossing"
# directory. Make sure the "WebCrossing" file is executable
# (-rwxr-xr-x via "sudo chmod +x WebCrossing") and StartupParameters.plist
# should already be (-rw-r--r--)
#
# That's it!
##

. /etc/rc.common

StartService ()
{
        ConsoleMessage "Starting WebCrossing"
    cd /webx/ ; ./make-run
}
StopService ()
{
        ConsoleMessage "Stopping WebCrossing"
    cd /webx/ ; ./make-quit
}

RestartService ()
{
        ConsoleMessage "Restarting WebCrossing"
    cd /webx/ ; ./make-quit
    cd /webx/ ; ./make-run
}

RunService "$1"
