From 61c1dc4984dba89348061acac8b803246378d18d Mon Sep 17 00:00:00 2001 From: Ian Beringer Date: Sun, 1 Feb 2015 20:18:32 +0100 Subject: [PATCH] allow for non-standard ssh port in status check --- management/status_checks.py | 2 +- setup/start.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/management/status_checks.py b/management/status_checks.py index e2e1ad00..d7ec0e21 100755 --- a/management/status_checks.py +++ b/management/status_checks.py @@ -58,7 +58,7 @@ def run_services_checks(env, output): { "name": "Sieve (dovecot)", "port": 4190, "public": True, }, { "name": "Mail-in-a-Box Management Daemon", "port": 10222, "public": False, }, - { "name": "SSH Login (ssh)", "port": 22, "public": True, }, + { "name": "SSH Login (ssh)", "port": int(env['SSH_PORT']), "public": True, }, { "name": "Public DNS (nsd4)", "port": 53, "public": True, }, { "name": "Incoming Mail (SMTP/postfix)", "port": 25, "public": True, }, { "name": "Outgoing Mail (SMTP 587/postfix)", "port": 587, "public": True, }, diff --git a/setup/start.sh b/setup/start.sh index 22759c60..bd6d7b78 100755 --- a/setup/start.sh +++ b/setup/start.sh @@ -109,6 +109,7 @@ PUBLIC_IPV6=$PUBLIC_IPV6 PRIVATE_IP=$PRIVATE_IP PRIVATE_IPV6=$PRIVATE_IPV6 CSR_COUNTRY=$CSR_COUNTRY +SSH_PORT=$(sshd -T 2>/dev/null | grep "^port " | sed "s/port //") EOF # Start service configuration.