From 4b28bf890fd355ac8562957f26662aef3372d496 Mon Sep 17 00:00:00 2001 From: John Chilton <jmchilton@gmail.com> Date: Fri, 29 Sep 2017 14:33:08 -0400 Subject: [PATCH] Fix Pulsar configs so ./run.sh just works out of the box. Unless uwsgi is available - but I can't get that to work at all today. --- pulsar/main.py | 2 ++ scripts/pulsar | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pulsar/main.py b/pulsar/main.py index eae928c5..6cada702 100644 --- a/pulsar/main.py +++ b/pulsar/main.py @@ -151,6 +151,8 @@ def load_app_configuration(ini_path=None, app_conf_path=None, app_name=None, loc local_conf = local_conf or {} if app_conf_path is None and "app_config" in local_conf: app_conf_path = absolute_config_path(local_conf["app_config"], config_dir) + if not os.path.exists(app_conf_path) and os.path.exists(app_conf_path + ".sample"): + app_conf_path = app_conf_path + ".sample" elif ini_path: # If not explicit app.yml file found - look next to server.ini - # be it in pulsar root, some temporary staging directory, or /etc. diff --git a/scripts/pulsar b/scripts/pulsar index d4817961..f6908cdf 100755 --- a/scripts/pulsar +++ b/scripts/pulsar @@ -22,7 +22,7 @@ Extra Options: EOF } -MODE="" +: ${MODE:=""} while : do case "$1" in @@ -58,7 +58,7 @@ do esac done -SCRIPTS_DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +SCRIPTS_DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/scripts" PROJECT_DIRECTORY=$SCRIPTS_DIRECTORY/.. PULSAR_CONFIG_DIR=${PULSAR_CONFIG_DIR:-"."} -- GitLab