The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-29-2008
big_nobody big_nobody is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 4
Question HELP: check if website is on, if not email

if {ping -c 1 www || { "Destination Host Unreachable" ; }}
then
{ echo "neveikia senas-pastas, web serveris" | mailx -s "Senas web serveris" mail }
endif;
this is my script but it does not work...

this script will be used to check if website is online if not then sends an email...

please help

Last edited by big_nobody; 08-29-2008 at 09:40 AM..