Need to write a bash script
Hello all,
I wanted to write a bash script which would connect to different mail, ftp, and web servers to make sure those are alive. I have written a simple script to know if a server is live using ping -c 1 and if exit status is 0 it assumes it is live. What command I should fire in order to know if smtp, web ,ftp server is alive Thanks in advance |
Netcat would help you
Code:
echo "quit" | nc $IP ftp There are very good pre-made scripts that do this, I am looking in my bookmarks. |
Hooray NX5000
Hats of nx5000,
You have just posted your ONE THOUSAND'TH:twocents: :twocents: :twocents: :twocents: :twocents: :twocents: message it was lucky me!!!!!!!!!!!!!!!!!!!!! Thanks for your reply and please find out those scripts for me in your bookmarks, Thanks for your time again Dont forget to have a celebration time for your 1000'th post |
Yeah yeah I've just been writing 20 posts in 4 hours to see this number. Now I'm looking for 10000 posts. Until then, the beer will flow!!
Before I get drunk, I think the app is: swatch http://freshmeat.net/projects/swatch/ I'm not 100% sure its the app I was looking for, there is another one I can't find.. I'll post if I find Otherwise do your own, using netcat. ps: imagineers7 , you also have to drink a beer btw :) |
This is the one I was looking for... easy name but hard to remember :)
http://freshmeat.net/projects/checkservice/ |
Hello NX5000,
Thanks for the links. I thinks checkservice was the thing I was looking for, (although I am going {2 try } to write my own script using nc) Also found swatch a useful app. Thanks again, Thanks for your time _____________________________________ You said:- "was there for 3-4 hours to see the number" Me:-"was there to be a member" i.e to cross the figure 30 Beer with double reasons of celebrations! |
All times are GMT -5. The time now is 09:26 PM. |