#!/bin/sh
# description: start application at scheduled time
#
# Released under GNU GPL

# Include the functions declared in the /etc/rc.d/functions file
source /etc/rc.d/functions

# path to script to run
NGINX="/etc/rc.d/rc.nginx"
#server name & description
SERVER="nginx"

case "$1" in
        start)
                echon "Starting $SERVER............"
                $NGINX start
		        evaluate_retval
                ;;

        stop)
                echon "Stopping $SERVER............"
                $NGINX stop
		        evaluate_retval
                ;;

        reload)
                echon "Reloading $SERVER..........."
                $NGINX reload
                evaluate_retval
                ;;
        restart)
                $0 stop
                /bin/sleep 1
                $0 start
                ;;
        status)
                $NGINX status
                ;;
        *)
                echo "Usage: $0 {start|stop|reload|restart|status}"
                exit 1
        ;;
esac

# End /etc/init.d/
