#!/sbin/sh

PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin

case $1 in
'start')
        if [ -x /usr/local/sbin/httpd ]; then
            /usr/local/sbin/httpd -f /usr/local/etc/apache/httpd.conf
            echo "started httpd"
        fi
        ;;
'stop')
        pids=`cat /home/www/logs/httpd.pid`
        if test "$pids"
        then
                kill $pids
        fi
        ;;
*)
        echo "usage: httpd {start|stop}"
        ;;
esac
