update-deployment: Compute ZULIP_COM setting.

This commit is contained in:
Tim Abbott 2016-07-19 20:42:17 -07:00
parent 7348841e65
commit 82f9f8f941
1 changed files with 7 additions and 0 deletions

View File

@ -1,10 +1,17 @@
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import print_function from __future__ import print_function
import os import os
import six.moves.configparser
import sys import sys
import subprocess import subprocess
import logging import logging
config_file = six.moves.configparser.RawConfigParser()
config_file.read("/etc/zulip/zulip.conf")
ZULIP_COM = config_file.get('machine', 'deploy_type') in ['zulip.com-prod',
'zulip.com-staging']
os.environ["PYTHONUNBUFFERED"] = "y" os.environ["PYTHONUNBUFFERED"] = "y"
sys.path.append(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(os.path.join(os.path.dirname(__file__), '..'))