vm/static/test_connection.sh
2017-02-07 13:45:30 +01:00

12 lines
229 B
Bash

#!/bin/bash
WGET="/usr/bin/wget"
$WGET -q --tries=20 --timeout=10 http://www.google.com -O /tmp/google.idx &> /dev/null
if [ ! -s /tmp/google.idx ]
then
echo -e "\e[31mNot Connected!\e[0m"
else
echo -e "Connected!"
fi