#!/bin/bash
#
# Startup script for YAWS web server
#
# chkconfig: 345 85 15
# description: A HTTP high perfomance 1.1 webserver particularly well suited \
#              for dynamic-content webapplications.
# config: /etc/yaws.conf
# config: /etc/config.d/yaws

. /etc/config.d/yaws

start ()
{
    echo -n "Starting YAWS: "
    /usr/bin/yaws $OPTIONS --id $ID &&
    echo -e $RESULT_OK || echo -e $RESULT_FAIL
}

stop ()
{
    echo -n "Stopping YAWS: "
    /usr/bin/yaws --stop --id $ID &&
    echo -e $RESULT_OK || echo -e $RESULT_FAIL
}

reload ()
{
    echo -n "Reloading YAWS: "
    /usr/bin/yaws --hup --id $ID &&
    echo -e $RESULT_OK || echo -e $RESULT_FAIL
}

status ()
{
    echo -n "Status for YAWS: "
    /usr/bin/yaws -ls
    /usr/bin/yaws --status --id $ID
}

. /lib/lsb/init-functions
