diff --git a/common.sh b/common.sh index d57fca1..4580ca1 100644 --- a/common.sh +++ b/common.sh @@ -120,3 +120,11 @@ wait_for_rsync() { exit 1 } +# ----------------------------- Check Server ----------------------------- +check_server_online() { + if ping -c 1 "$REMOTE_SERVER" &>/dev/null; then + return 0 + else + return 1 + fi +} \ No newline at end of file