diff --git a/discourse-doctor b/discourse-doctor index 9f892361b..7d9de335e 100755 --- a/discourse-doctor +++ b/discourse-doctor @@ -1,6 +1,7 @@ #!/usr/bin/env bash LOG_FILE="/tmp/discourse-debug.txt" WORKING_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +app_name="$1" log() { if [ "$1" == "-e" ] @@ -237,8 +238,12 @@ check_email() { } get_yml_file() { - app_name="" - if [ -f containers/app.yml ] + if [ -n "$app_name" ] && [ -f "containers/$app_name.yml" ] + then + log "Using app name '$app_name' from command argument" + web_file="containers/$app_name.yml" + log "Found $web_file" + elif [ -f containers/app.yml ] then app_name="app" web_file=containers/$app_name.yml