mirror of
https://github.com/flynx/proxmox-utils.git
synced 2025-10-28 18:50:08 +00:00
tweak...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e62dea61e7
commit
68204a8140
@ -66,6 +66,7 @@ declare -A HANDLERS
|
||||
HANDLERS[tcp]=check-port
|
||||
HANDLERS[udp]=check-port
|
||||
|
||||
# XXX this seems to be broken...
|
||||
check-port(){
|
||||
local udp=
|
||||
if [[ "${1:0:3}" == "udp" ]] ; then
|
||||
@ -81,7 +82,7 @@ check-port(){
|
||||
|
||||
local res=$(timeout $TIMEOUT nc -vz${udp} $target $port 2>&1)
|
||||
|
||||
if [[ "$res" =~ .*open$ ]] ; then
|
||||
if [[ $res =~ .*open$ ]] ; then
|
||||
echo ERROR
|
||||
else
|
||||
echo OK
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user