1234567#!/bin/bash # function for connection checkfunction connected { ping -c 1 google.com &>/dev/null}