I have not looked at the detection code but it might be possible to use "ss" instead of lsof to detect if anything listens on a given port. "ss" comes from iproute2 so it's more widely available.
$ ss -nto state listening 'sport = 80'
Recv-Q Send-Q Local Address:Port Peer Address:Port
0 0 *:80 *:*
0 0 :::80 :::*
I tried suppressing the header with "-H/--no-header" but ss segfaults but that's for another LP :)
I have not looked at the detection code but it might be possible to use "ss" instead of lsof to detect if anything listens on a given port. "ss" comes from iproute2 so it's more widely available.
$ ss -nto state listening 'sport = 80'
Recv-Q Send-Q Local Address:Port Peer Address:Port
0 0 *:80 *:*
0 0 :::80 :::*
I tried suppressing the header with "-H/--no-header" but ss segfaults but that's for another LP :)