rpms/nginx/EL-5 nginx-conf.patch, 1.2, 1.3 nginx.init, 1.1, 1.2 nginx.spec, 1.15, 1.16
Jeremy Hinegardner (jjh)
fedora-extras-commits at redhat.com
Tue May 27 04:42:01 UTC 2008
- Previous message: rpms/nginx/devel nginx-conf.patch,1.2,1.3 nginx.spec,1.22,1.23
- Next message: rpms/nginx/F-7 nginx-conf.patch, 1.2, 1.3 nginx.init, 1.2, 1.3 nginx.spec, 1.17, 1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jjh
Update of /cvs/pkgs/rpms/nginx/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20004
Modified Files:
nginx-conf.patch nginx.init nginx.spec
Log Message:
fix initscript and default configuration
nginx-conf.patch:
Index: nginx-conf.patch
===================================================================
RCS file: /cvs/pkgs/rpms/nginx/EL-5/nginx-conf.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- nginx-conf.patch 13 May 2008 06:24:45 -0000 1.2
+++ nginx-conf.patch 27 May 2008 04:41:06 -0000 1.3
@@ -84,7 +84,7 @@
server {
- listen 80;
- server_name localhost;
-+ listen 80 default;
++ listen 80;
+ server_name _;
#charset koi8-r;
Index: nginx.init
===================================================================
RCS file: /cvs/pkgs/rpms/nginx/EL-5/nginx.init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- nginx.init 24 Mar 2007 18:59:47 -0000 1.1
+++ nginx.init 27 May 2008 04:41:07 -0000 1.2
@@ -7,6 +7,7 @@
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
+# config: /etc/sysconfig/nginx
# pidfile: /var/run/nginx.pid
# Source function library.
@@ -21,13 +22,17 @@
nginx="/usr/sbin/nginx"
prog=$(basename $nginx)
-[ -e /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx
+NGINX_CONF_FILE="/etc/nginx/nginx.conf"
+
+[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginx
lockfile=/var/lock/subsys/nginx
start() {
+ [ -x $nginx ] || exit 5
+ [ -f $NGINX_CONF_FILE ] || exit 6
echo -n $"Starting $prog: "
- daemon $nginx -c /etc/$prog/$prog.conf
+ daemon $nginx -c $NGINX_CONF_FILE
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
@@ -44,11 +49,13 @@
}
restart() {
+ configtest || return $?
stop
start
}
reload() {
+ configtest || return $?
echo -n $"Reloading $prog: "
killproc $nginx -HUP
RETVAL=$?
@@ -59,24 +66,44 @@
restart
}
-fdr_status() {
+configtest() {
+ $nginx -t -c $NGINX_CONF_FILE
+}
+
+rh_status() {
status $prog
}
+rh_status_q() {
+ rh_status >/dev/null 2>&1
+}
+
case "$1" in
- start|stop|restart|reload)
+ start)
+ rh_status_q && exit 0
+ $1
+ ;;
+ stop)
+ rh_status_q || exit 0
+ $1
+ ;;
+ restart|configtest)
+ $1
+ ;;
+ reload)
+ rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
- fdr_status
+ rh_status
;;
condrestart|try-restart)
- [ ! -f $lockfile ] || restart
- ;;
+ rh_status_q || exit 0
+ ;;
*)
- echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
+ echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"
exit 2
esac
Index: nginx.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nginx/EL-5/nginx.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- nginx.spec 13 May 2008 06:32:26 -0000 1.15
+++ nginx.spec 27 May 2008 04:41:07 -0000 1.16
@@ -9,7 +9,7 @@
Name: nginx
Version: 0.6.31
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Robust, small and high performance http and reverse proxy server
Group: System Environment/Daemons
@@ -189,6 +189,10 @@
%changelog
+* Mon May 26 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.31-3
+- update init script
+- remove 'default' listen parameter
+
* Tue May 13 2008 Jeremy Hinegardner <jeremy at hinegardner dot org> - 0.6.31-2
- added missing Source files
- Previous message: rpms/nginx/devel nginx-conf.patch,1.2,1.3 nginx.spec,1.22,1.23
- Next message: rpms/nginx/F-7 nginx-conf.patch, 1.2, 1.3 nginx.init, 1.2, 1.3 nginx.spec, 1.17, 1.18
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list