summaryrefslogtreecommitdiff
path: root/scripts/listen-check
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/listen-check')
-rwxr-xr-xscripts/listen-check37
1 files changed, 0 insertions, 37 deletions
diff --git a/scripts/listen-check b/scripts/listen-check
deleted file mode 100755
index 45fe716..0000000
--- a/scripts/listen-check
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-#
-# Check that the host only listens on ports that are acceptable.
-
-set -e
-
-ports()
-{
- netstat -nlap |
- awk '
- $6 == "LISTEN" {
- n = split($7, a, /\//)
- printf "%-10s %-20s %-20s %s\n", $1, $4, $5, a[2]
- }'
-}
-
-
-case "$1" in
- list)
- ports
- ;;
- report)
- temp="$(mktemp)"
- ports > "$temp"
- if diff -u /etc/listen-check.ok "$temp"
- then
- rm -f "$temp"
- else
- rm -f "$temp"
- exit 1
- fi
- ;;
- *)
- echo "EEeek. Usage, man!" 1>&2
- exit 1
- ;;
-esac