Sponsored Content
Top Forums UNIX for Dummies Questions & Answers restarting a webserver on hang Post 302204960 by zaxxon on Friday 13th of June 2008 03:33:37 AM
Old 06-13-2008
Hm, when assigning the $running the second time, you will always get something different than "no", no matter if curl was successful or not, I think. So it will always fail and restart. Maybe you can check this by the process' time of your httpd.

Better drop the 1st line and have something like checking the exit status of curl:
Code:
curl --connect-timeout 3 http://localhost/running.txt > /dev/null 2>&1
if [ $? != 0 ]; then
...

or drop the 1st line and do
Code:
running=`curl --connect-timeout 3 http://localhost/running.txt`
if [ $running != "running" ]; then
...

 

10 More Discussions You Might Find Interesting

1. OS X (Apple)

Webserver Setup, need help!

Hey guys, does anyone know how I edit, configure the server settings using the terminal? MySQL and PHP was once working. But after frying the Xserve G5 i'm in the middle of rebuilding everything, I believe i need to re-configure the root document directory... but have forgotten how to edit... (1 Reply)
Discussion started by: hype.it
1 Replies

2. SuSE

Cannot connect to webserver

Hello All, I need some help as to how to debug the problem I am having with my webserver. I am using Suse 9.2 pro as my server. I have setup my firewall and router to forward http 80 request to my linux server. I tried pinging my server from work - it worked. I tried running localhost... (5 Replies)
Discussion started by: negixx
5 Replies

3. UNIX for Dummies Questions & Answers

Restarting the Spooler

:confused: Everytime our UNIXWARE 7 Server is restarted we also have to restart the spooler. If the spooler is not restarted, print jobs get stuck in the queu. Once restarted by using the following command lpstop and lpstart everything works fine. Does anyone have any ideas what could be causing... (0 Replies)
Discussion started by: Yorgy
0 Replies

4. UNIX for Advanced & Expert Users

apache webserver

Can I set up an apache webserver on Mandriva? Looking for the easiest webserver program to install basic webserver just for home use. Any ideas/suggestions much appreciated..... (2 Replies)
Discussion started by: jo calamine
2 Replies

5. Solaris

webserver login

how can I get statistics and web analysis for solaris 10 webserver access? what is the file? and what is the tools to analyze it? thanx (2 Replies)
Discussion started by: fsmadi
2 Replies

6. Solaris

telnet Webserver GET /

I want to incorporate this in a script for some simple monitoring for my webserver telnet localhost 80 GET /opencms/opencms/test/index.html how to do it? I tried echo "GET /opencms/opencms/test/index.html" | telnet localhost 80 I tried telnet localhost 80 << EOF echo "GET... (4 Replies)
Discussion started by: sparcguy
4 Replies

7. Programming

Restarting the program

Hi, I use gfortran to run the code. Some times I need to stop the program and restart it. On restarting I need to run the program from the beginning. Is there any script or option available to restart the program from where it stopped? This script/option will be immensely useful for... (2 Replies)
Discussion started by: rpd25
2 Replies

8. UNIX for Dummies Questions & Answers

Restarting a process

Hi, How is it possible to restart only your process. I can get the process killed but I am not able to start it. For eg : i first did this ps -ef|grep _out --displays all the process with _out in the name then I killed kill -15 36044 -- process id. Now how can i start the same... (1 Reply)
Discussion started by: TH3M0Nk
1 Replies

9. Shell Programming and Scripting

Need help in restarting process

Hi friends, I have one unix command which is used to check the network status manually. followig is the command check_Network this command give follwoing status Network 1 is ok Network 2 is ok network 3 is ok network 4 is ok . . . . Network 10 is... (8 Replies)
Discussion started by: Nakul_sh
8 Replies

10. Emergency UNIX and Linux Support

Netcat ( nc -l ) as webserver

Dear Linux guru's I am trying to create a webserver using nc (netcat only) on RHEL 7.2 running on bash shell. now the easy thing is to get nc listing to a port and respond back $ while true; do { echo -e 'HTTP/1.0 200 OK\r\n'; set; } | nc -l 7877; done This when called from a... (3 Replies)
Discussion started by: chakrapani
3 Replies
BBMESSAGE.CGI(8)					      System Manager's Manual						  BBMESSAGE.CGI(8)

NAME
bbmessage.cgi - CGI utility used for proxying Xymon data over HTTP SYNOPSIS
bbmessage.cgi DESCRIPTION
bbmessage.cgi(8) is the server-side utility receiving Xymon messages sent by the bb(1) utility over an HTTP transport. The bb utility nor- mally sends data over a dedicated TCP protocol, but it may use HTTP to go through proxies or through restrictive firewalls. In that case, the webserver must have this CGI utility installed, which takes care of receiving the message via HTTP, and forwards it to a local Xymon server through the normal Xymon transport. The CGI expects to be invoked from an HTTP "POST" request, with the POST-data being the status-message. bbmessage.cgi simply collects all of the POST data, and send it off as a message to the Xymon daemon running on IP 127.0.0.1. This destination IP currently cannot be changed. The CGI will return any output provided by the Xymon daemon back to the requestor as the response to the HTTP POST, so this allows for all normal Xymon commands to work. SECURITY
bbmesage.cgi will only send data to a Xymon server through the loopback interface, i.e. IP-address 127.0.0.1. Access to the CGI should be restricted through webserver access controls, since the CGI provides no authentication at all to validate incoming messages. If possible, consider using the bbproxy(8) utility instead for native proxying of Xymon data between networks. SEE ALSO
bb(1), bbproxy(8), xymon(7) Xymon Version 4.2.3: 4 Feb 2009 BBMESSAGE.CGI(8)
All times are GMT -4. The time now is 11:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy