#!/bin/sh # # /etc/rc.d/httpd: start/stop Apache HTTP daemon # . /etc/rc.subr NAME="Apache HTTP daemon" PROG=/usr/sbin/httpd case $1 in start) msg "Starting $NAME..." mkdir -p /var/run/httpd start_daemon /usr/sbin/apachectl -k start ;; stop) msg "Stopping $NAME..." start_daemon /usr/sbin/apachectl -k stop ;; restart) msg "Restarting $NAME..." start_daemon /usr/sbin/apachectl -k restart ;; status) status_daemon $PROG ;; *) echo "usage: $0 [start|stop|restart|status]" ;; esac # End of file