1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-07-16 16:21:48 +00:00

Merge pull request #896 from haiwen/fix-cluster-mode

fixed is_cluster_mode
This commit is contained in:
xiez 2015-11-17 10:33:54 +08:00
commit d23a125e56

View File

@ -57,7 +57,11 @@ except ImportError:
def is_cluster_mode():
cfg = ConfigParser.ConfigParser()
conf = os.path.join(os.environ['SEAFILE_CONF_DIR'], 'seafile.conf')
if 'SEAFILE_CENTRAL_CONF_DIR' in os.environ:
confdir = os.environ['SEAFILE_CENTRAL_CONF_DIR']
else:
confdir = os.environ['SEAFILE_CONF_DIR']
conf = os.path.join(confdir, 'seafile.conf')
cfg.read(conf)
if cfg.has_option('cluster', 'enabled'):
enabled = cfg.getboolean('cluster', 'enabled')