Add an rc script for nginx too

This commit is contained in:
robert 2010-11-04 07:39:44 +00:00
parent 2f973aac7d
commit 51de3dc41b
5 changed files with 24 additions and 11 deletions

View File

@ -1,10 +1,12 @@
# $OpenBSD: Makefile,v 1.28 2010/11/04 01:41:11 dlg Exp $
# $OpenBSD: Makefile,v 1.29 2010/11/04 07:39:44 robert Exp $
COMMENT= robust and small HTTP server and mail proxy server
DISTNAME= nginx-0.8.53
CATEGORIES= www
REVISION= 0
HOMEPAGE= http://nginx.net/
MAINTAINER= William Yodlowsky <bsd@openbsd.rutgers.edu>

View File

@ -24,3 +24,6 @@ Mail proxy server features:
o SMTP: AUTH LOGIN PLAIN CRAM-MD5
* SSL support.
* STARTTLS and STLS support.
Documentation on nginx can be found on the wiki:
http://wiki.nginx.org/

View File

@ -1,9 +0,0 @@
Documentation on nginx can be found on the wiki:
http://wiki.nginx.org/
You may want to put the following into your /etc/rc.local:
# start nginx
if [ -x ${PREFIX}/sbin/nginx ]; then
echo -n ' nginx'; ${PREFIX}/sbin/nginx
fi

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.5 2010/11/04 01:41:11 dlg Exp $
@comment $OpenBSD: PLIST,v 1.6 2010/11/04 07:39:44 robert Exp $
@newgroup _nginx:593
@newuser _nginx:593:_nginx:daemon:nginx user:/nonexistent:/sbin/nologin
@bin sbin/nginx
@ -13,6 +13,7 @@
@owner
@group
@sample ${SYSCONFDIR}/nginx/
share/nginx/
share/nginx/fastcgi_params
@sample ${SYSCONFDIR}/nginx/fastcgi_params
share/nginx/html/
@ -31,3 +32,4 @@ share/nginx/nginx.conf
@sample ${SYSCONFDIR}/nginx/nginx.conf
share/nginx/win-utf
@sample ${SYSCONFDIR}/nginx/win-utf
@rcscript ${RCDIR}/nginx

15
www/nginx/pkg/nginx.rc Executable file
View File

@ -0,0 +1,15 @@
. /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