nginx init script for redhat (rhel5)
mike
mike503 at gmail.com
Tue Mar 17 09:57:26 MSK 2009
I changed this minorly
restart() {
configtest || return $?
stop
sleep 1
start
}
to include that sleep 1
it seems sometimes "stop" doesn't clean things up fast enough perhaps.
since then i have had no issues
[root at mia32217www002 build]# service nginx restart
2009/03/16 22:48:01 [info] 2934#0: the configuration file
/etc/nginx/nginx.conf syntax is ok
2009/03/16 22:48:01 [info] 2934#0: the configuration file
/etc/nginx/nginx.conf was tested successfully Stopping nginx: [ OK ]
Starting nginx: [ OK ]
[root at mia32217www002 build]# service nginx restart
2009/03/16 22:48:03 [info] 2957#0: the configuration file
/etc/nginx/nginx.conf syntax is ok
2009/03/16 22:48:03 [info] 2957#0: the configuration file
/etc/nginx/nginx.conf was tested successfully Stopping nginx: [ OK ]
Starting nginx: [ OK ]
[root at mia32217www002 build]# service nginx restart
2009/03/16 22:48:03 [info] 2980#0: the configuration file
/etc/nginx/nginx.conf syntax is ok
2009/03/16 22:48:03 [info] 2980#0: the configuration file
/etc/nginx/nginx.conf was tested successfully Stopping nginx: [ OK ]
Starting nginx:
[root at mia32217www002 build]# service nginx restart
2009/03/16 22:49:04 [info] 3052#0: the configuration file
/etc/nginx/nginx.conf syntax is ok
2009/03/16 22:49:04 [info] 3052#0: the configuration file
/etc/nginx/nginx.conf was tested successfully Stopping nginx: [FAILED]
Starting nginx: [ OK ]
^^ that fourth time it failed...
sleep 1 so far seems to be foolproof. my provider probably hates me
ive been restarting it over and over.
On Mon, Mar 16, 2009 at 9:20 PM, Cliff Wells <cliff at develix.com> wrote:
> On Mon, 2009-03-16 at 20:52 -0700, mike wrote:
>> On Mon, Mar 16, 2009 at 8:51 PM, mike <mike503 at gmail.com> wrote:
>> > On Mon, Mar 16, 2009 at 8:44 PM, Cliff Wells <cliff at develix.com> wrote:
>> >> Oops. Ignore that. Here's what I use:
>> >>
>> >> http://wiki.nginx.org/RedHatNginxInitScript
>> >
>> > Got that in plaintext? It wants to copy all the whitespace in my browser too :P
>>
>> n/m firefox to the rescue.
>
>
> If you click the link right above the script, it should offer to
> download it for you.
>
> Cliff
>
>
>
More information about the nginx
mailing list