refactor: drop direct access to PORT files

This commit is contained in:
Jose Diaz-Gonzalez authored and Michael Hobbs committed 2017-10-02 15:05:13 -07:00
1 parent 9ef7c385d4
commit 81ddef04ff
1 file changed
+5 -3
+5 -3
View File
@@ -1040,9 +1040,11 @@ get_app_urls() {
echo "$(< "$DOKKU_ROOT/HOSTNAME"):$app_port (container)" echo "$(< "$DOKKU_ROOT/HOSTNAME"):$app_port (container)"
done done
else else
shopt -s nullglob local DOKKU_APP_LISTENERS PORT
for PORT_FILE in $DOKKU_ROOT/$APP/PORT.*; do DOKKU_APP_LISTENERS="$(plugn trigger network-get-listeners "$APP" | xargs)"
echo "$SCHEME://$(< "$DOKKU_ROOT/HOSTNAME"):$(< "$PORT_FILE") (container)" for DOKKU_APP_LISTENER in $DOKKU_APP_LISTENERS; do
PORT="$(echo "$DOKKU_APP_LISTENER" | cut -d ':' -f2)"
echo "$SCHEME://$(< "$DOKKU_ROOT/HOSTNAME"):$PORT (container)"
done done
shopt -u nullglob shopt -u nullglob
fi fi