From 151520d9cafd9c116926b88ad7b34cca647b780f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guitaut?= Date: Tue, 8 Sep 2015 00:29:35 +0200 Subject: [PATCH] Display which ports are exposed in `list` --- functions | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/functions b/functions index 9552dd4..60ba792 100755 --- a/functions +++ b/functions @@ -66,7 +66,12 @@ service_exposed_ports() { local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE" local PORT_FILE="$SERVICE_ROOT/PORT" [[ ! -f $PORT_FILE ]] && return 0 - printf ", exposed port(s): %s" "$(cat "$PORT_FILE")" + local PORTS=($(cat "$PORT_FILE")) + echo -n ", exposed port(s):" + for (( i=0; i < ${#PLUGIN_DATASTORE_PORTS[@]}; i++ )); do + echo -n " ${PLUGIN_DATASTORE_PORTS[i]}->${PORTS[i]}" + done + echo "" } service_link() {