mirror of https://github.com/zulip/zulip.git
Update generate_enterprise_secrets to support running in production.
(imported from commit 1051f668ebe684cc60ba4444e815ef60398fad61)
This commit is contained in:
parent
e79447131f
commit
9000d27f12
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue