Files
ports/main/apache/rc.httpd
2021-05-12 08:11:10 +08:00

34 lines
530 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
;;
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