mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-16 00:06:11 +00:00
Merge pull request #896 from haiwen/fix-cluster-mode
fixed is_cluster_mode
This commit is contained in:
commit
d23a125e56
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user