From 9000d27f12dc0693a5c3d0e420a41bbcd5a35de9 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 20 Aug 2015 16:46:52 -0700 Subject: [PATCH] Update generate_enterprise_secrets to support running in production. (imported from commit 1051f668ebe684cc60ba4444e815ef60398fad61) --- scripts/setup/generate_enterprise_secrets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/setup/generate_enterprise_secrets.py b/scripts/setup/generate_enterprise_secrets.py index 0390f8466a..33a6001d46 100755 --- a/scripts/setup/generate_enterprise_secrets.py +++ b/scripts/setup/generate_enterprise_secrets.py @@ -11,7 +11,6 @@ from zerver.lib.utils import generate_random_token os.chdir(os.path.join(os.path.dirname(__file__), '..', '..')) -OUTPUT_SETTINGS_FILENAME = "zproject/dev-secrets.conf" CAMO_CONFIG_FILENAME = '/etc/default/camo' AUTOGENERATED_SETTINGS = ['shared_secret', 'avatar_salt', 'rabbitmq_password', 'local_database_password', @@ -35,6 +34,11 @@ def generate_django_secretkey(): return get_random_string(50, chars) def generate_secrets(development=False): + if development: + OUTPUT_SETTINGS_FILENAME = "zproject/dev-secrets.conf" + else: + OUTPUT_SETTINGS_FILENAME = "/etc/zulip/zulip-secrets.conf" + lines = ['[secrets]\n'] def config_line(var, value):