Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 39 lines (32 sloc) 0.63 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
#!/bin/sh

##
# Yaws HTTP Server
##

. /etc/rc.common

yaws=%prefix%/bin/yaws
lockdir=/var/spool/lock
yawsid_opts=--id myserverid

StartService ()
{
    if [ "${YAWS:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Starting yaws http daemon"
HOME=/tmp $yaws ${yawsid_opts} --daemon --heart
RETVAL=$?
[ $RETVAL = 0 ]
    fi
}

StopService ()
{
    ConsoleMessage "Stopping yaws http daemon"
    HOME=/tmp $yaws ${yawsid_opts} --stop
}

RestartService ()
{
    if [ "${YAWS:=-NO-}" = "-YES-" ]; then
ConsoleMessage "Restarting yaws http daemon"
HOME=/tmp $yaws ${yawsid_opts} --hup
    else
StopService
    fi
}

RunService "$1"
Something went wrong with that request. Please try again.