mirror of
https://github.com/m8tin/cis.git
synced 2025-12-06 15:58:26 +01:00
10 lines
370 B
Bash
Executable File
10 lines
370 B
Bash
Executable File
#!/bin/bash
|
|
|
|
_SERVER="${1:?"FQDN of server missing"}"
|
|
|
|
# -4 Use IPv4
|
|
# -W SECONDS Wait seconds for an answer
|
|
# -c COUNT_VALUE Count of pings being executed
|
|
_RESULT="$(ping -4 -W 1 -c 1 "${_SERVER}" | grep "time=" | cut -d'=' -f4)"
|
|
! [ -z "${_RESULT}" ] && echo "OK#RTT: ${_RESULT}" || echo "FAIL#PLEASE USE FALLBACK!"
|