openbsd-ports/www/nginx/pkg/nginx.rc
ajacoutot 37d4ed9f1a Add rcs id and shebang.
Protect variable names.
2010-11-04 07:54:51 +00:00

20 lines
302 B
Bash
Executable File

#!/bin/sh
#
# $OpenBSD: nginx.rc,v 1.2 2010/11/04 07:54:51 ajacoutot Exp $
. /etc/rc.d/rc.subr
daemon=${TRUEPREFIX}/sbin/nginx
pexp="nginx:.*master.*process"
rc_reload() {
${daemon} -s reload >/dev/null
}
rc_stop() {
${daemon} -s stop >/dev/null
[ $? -gt 0 ] && pkill -f "^${pexp}"
}
rc_cmd $1