shell-utils/sys/netcheck
2023-07-15 20:21:25 +01:00

12 lines
292 B
Bash
Executable File

#!/usr/bin/env bash
nchk=$(/home/gmgauthier/.local/bin/ifcheck)
ping -q -n -c1 "1.1.1.1" &>"/dev/null"
if [[ "${?}" -ne 0 ]]; then
/home/gmgauthier/.local/bin/cecho "BRed" "UNAVAILABLE"
elif [[ "${#args[@]}" -eq 0 ]]; then
/home/gmgauthier/.local/bin/cecho "IGreen" "AVAILABLE"
fi