Files
ports/core/apache/httpd.rc
2018-08-13 23:58:19 +08:00

37 lines
566 B
Bash
Executable File

#!/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
eval_stat
;;
stop)
msg "Stopping $NAME..."
start_daemon /usr/sbin/apachectl -k stop
eval_stat
;;
restart)
msg "Restarting $NAME..."
start_daemon /usr/sbin/apachectl -k restart
eval_stat
;;
status)
status_daemon $PROG
;;
*)
echo "usage: $0 [start|stop|restart|status]"
;;
esac
# End of file