#!/bin/bash if [ -n "${DISABLE_HEALTH_CHECK}" ]; then exit 0 else is_port_open="$(nmap 127.0.0.1 -p {{ cfg.port }} | tail -3 | head -1 | awk '{print $2}')" if [ "${is_port_open}" == "open" ]; then exit 0 else exit 2 fi fi