Add files via upload
This commit is contained in:
committed by
GitHub
parent
d5dca126a6
commit
5ecb235919
11
lib/internet.sh
Normal file
11
lib/internet.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
check_internet_connection() {
|
||||
log_info "Checking internet connection..."
|
||||
if ping -c 1 google.com &> /dev/null; then
|
||||
log_info "Internet connection is active."
|
||||
else
|
||||
log_error "No internet connection. Please check your network settings."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user