mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
fix Seafile-CE init error.
This commit is contained in:
parent
fe7016a77b
commit
65d1ec136f
|
@ -173,16 +173,17 @@ COMPRESS_CACHE_BACKEND = 'locmem'""")
|
||||||
|
|
||||||
# Disabled the Elasticsearch process on Seafile-container
|
# Disabled the Elasticsearch process on Seafile-container
|
||||||
# Connection to the Elasticsearch-container
|
# Connection to the Elasticsearch-container
|
||||||
with open(join(topdir, 'conf', 'seafevents.conf'), 'r') as fp:
|
if os.path.exists(join(topdir, 'conf', 'seafevents.conf')):
|
||||||
fp_lines = fp.readlines()
|
with open(join(topdir, 'conf', 'seafevents.conf'), 'r') as fp:
|
||||||
if '[INDEX FILES]\n' in fp_lines:
|
fp_lines = fp.readlines()
|
||||||
insert_index = fp_lines.index('[INDEX FILES]\n') + 1
|
if '[INDEX FILES]\n' in fp_lines:
|
||||||
insert_lines = ['es_port = 9200\n', 'es_host = elasticsearch\n', 'external_es_server = true\n']
|
insert_index = fp_lines.index('[INDEX FILES]\n') + 1
|
||||||
for line in insert_lines:
|
insert_lines = ['es_port = 9200\n', 'es_host = elasticsearch\n', 'external_es_server = true\n']
|
||||||
fp_lines.insert(insert_index, line)
|
for line in insert_lines:
|
||||||
|
fp_lines.insert(insert_index, line)
|
||||||
|
|
||||||
with open(join(topdir, 'conf', 'seafevents.conf'), 'w') as fp:
|
with open(join(topdir, 'conf', 'seafevents.conf'), 'w') as fp:
|
||||||
fp.writelines(fp_lines)
|
fp.writelines(fp_lines)
|
||||||
|
|
||||||
# After the setup script creates all the files inside the
|
# After the setup script creates all the files inside the
|
||||||
# container, we need to move them to the shared volume
|
# container, we need to move them to the shared volume
|
||||||
|
|
Loading…
Reference in a new issue