wombat.ch

your Partner for Network Design and CMS

If Ping fail do a action



  #!/bin/bash
IP='192.168.1.1'
fping
-c1 -t300 $IP 2>/dev/null 1>/dev/null
if [ "$?" = 0 ]
then
    echo
"Host found"
else
    echo
"Host not found"
fi
 
     
 

ping -c4 10.18.23.1 > /dev/null

if [ $? != 0 ]
then
echo "No network connection, restarting wlan0"
/sbin/ifdown 'wlan0'
 sleep 5
 /sbin/ifup --force 'wlan0'
 fi

 
     
will check the feedback 0 or 1 ping 10.147.42.63 ; echo $?  
     
  #   vi /usr/local/bin/vm162restart.sh  
  #!/bin/bash
IP='192.168.1.1'

ping -c4 $IP > /dev/null

if [ $? != 1 ]


then
    echo "Host found"
else

echo "host not found - restart...."
   qm reset xxx
   qm resume xxx
   qm start xxx
fi 
 
  #   chmod +x /usr/local/bin/vm162restart.sh  
     
     
  #!/bin/bash

status_code
=$(curl --write-out %{http_code} --silent --output /dev/null www.bbc.co.uk/news)

if
[[ "$status_code" -ne 200 ]] ; then 
      echo
"Site status changed to $status_code" | mail -s "SITE STATUS CHECKER" "This email address is being protected from spambots. You need JavaScript enabled to view it." -r "STATUS_CHECKER"

else

      exit
0

fi
 
 
  url='http://localhost:8080/'
status
=$(curl --head --location --connect-timeout 5 --write-out %{http_code} --silent --output /dev/null ${url})
[[ $status == 500 ]] || [[ $status == 000 ]] && echo restarting ${url} # do start/restart logic 
 
     

RSS Feed


Warning: file_get_contents(https://www.bsi.bund.de/SiteGlobals/Functions/RSSFeed/RSSNewsfeed/RSSNewsfeed_WID.xml): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(https://www.bsi.bund.de/SiteGlobals/Functions/RSSFeed/RSSNewsfessBSIFB/RSSNewsfeed_BuergerCERT.xml): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(http://feeds.joomla.org/JoomlaAnnouncements): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(http://feeds.joomla.org/JoomlaSecurityNews): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:0A000152:SSL routines::unsafe legacy renegotiation disabled in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(): Failed to enable crypto in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: file_get_contents(https://tools.cisco.com/security/center/psirtrss20/CiscoSecurityAdvisory.xml): failed to open stream: operation failed in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 273

Warning: Invalid argument supplied for foreach() in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 39

Warning: Invalid argument supplied for foreach() in /var/www/clients/client2/web2/web/j/modules/mod_jw_srfr/helper.php on line 39

neusten Links


Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/clients/client2/web2/web/j/modules/mod_quicklistweblinks/helper.php on line 78
many More Links »

part of ...

Linux Counter

Disqus

 

Learning Network

Seti@home & Boinc

myBonic

statistik

 


Who is Online

We have 406 guests and no members online

We have 424 guests, one bot and no members online


one bot:
1 x BOT for JCE