Fix allservicestatus
This commit is contained in:
parent
c1db6284a2
commit
513431b7a3
@ -20,7 +20,7 @@ SCRIPT_DIR="$(dirname "$0")"
|
|||||||
# // |-- (script files)
|
# // |-- (script files)
|
||||||
|
|
||||||
# Get all services on the server
|
# Get all services on the server
|
||||||
SERVICES_PATH="${SCRIPT_DIR}/../"
|
SERVICES_PATH="${SCRIPT_DIR}/../../"
|
||||||
|
|
||||||
# Get all service names
|
# Get all service names
|
||||||
SERVICE_NAMES=$(ls "${SERVICES_PATH}")
|
SERVICE_NAMES=$(ls "${SERVICES_PATH}")
|
||||||
@ -44,8 +44,8 @@ for SERVICE_NAME in ${SERVICE_NAMES}; do
|
|||||||
# Get the service ports
|
# Get the service ports
|
||||||
PORTS_FILE="${SERVICE_PATH}/template/ports.sh"
|
PORTS_FILE="${SERVICE_PATH}/template/ports.sh"
|
||||||
if [ -f "${PORTS_FILE}" ]; then
|
if [ -f "${PORTS_FILE}" ]; then
|
||||||
# suppress all output from the ports script
|
# capture output from the ports script
|
||||||
SERVICE_PORTS=$(bash "${PORTS_FILE}" "${SERVICE_PATH}/config" > /dev/null 2>&1)
|
SERVICE_PORTS=$(bash "${PORTS_FILE}" "${SERVICE_PATH}/config" 2>&1)
|
||||||
else
|
else
|
||||||
SERVICE_PORTS="unknown"
|
SERVICE_PORTS="unknown"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user