Replace netstat by ss

ss(8) is a modern replacement for netstat(8). The former is slowly replacing
the latter in major Linux distributions, which makes it necessary to switch
at some point.

This addresses .

Signed-off-by: Karol Babioch <kbabioch@suse.de>
This commit is contained in:
Karol Babioch 2018-01-11 16:43:53 +01:00
parent aae04fb75e
commit 997ce7330e
2 changed files with 2 additions and 2 deletions

View file

@ -32,7 +32,7 @@ fi
# 7.3
check_7_3="7.3 - Ensure swarm services are binded to a specific host interface"
if docker info 2>/dev/null | grep -e "Swarm:*\sactive\s*" >/dev/null 2>&1; then
netstat -lnt | grep -e '\[::]:2377 ' -e ':::2377' -e '*:2377 ' -e ' 0\.0\.0\.0:2377 ' >/dev/null 2>&1
ss -lnt | grep -e '\[::]:2377 ' -e ':::2377' -e '*:2377 ' -e ' 0\.0\.0\.0:2377 ' >/dev/null 2>&1
if [ $? -eq 1 ]; then
pass "$check_7_3"
logjson "7.3" "PASS"