mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
fix gunicorn bind replace
This commit is contained in:
parent
d3352d6840
commit
dd1f375257
|
@ -47,6 +47,7 @@ def fix_gunicorn_bind():
|
|||
if os.path.exists(join(shared_seafiledir, 'conf', 'gunicorn.conf.py')):
|
||||
with open(join(shared_seafiledir, 'conf', 'gunicorn.conf.py'), 'r') as fp:
|
||||
fp_lines = fp.readlines()
|
||||
if 'bind = "127.0.0.1:8000"\n' in fp_lines:
|
||||
replace_index = fp_lines.index('bind = "127.0.0.1:8000"\n')
|
||||
replace_line = 'bind = "0.0.0.0:8000"\n'
|
||||
fp_lines[replace_index] = replace_line
|
||||
|
@ -80,7 +81,7 @@ def main():
|
|||
|
||||
try:
|
||||
call('{} start'.format(get_script('seafile.sh')))
|
||||
call('{} start'.format(get_script('seahub.sh')))
|
||||
#call('{} start'.format(get_script('seahub.sh')))
|
||||
finally:
|
||||
if exists(password_file):
|
||||
os.unlink(password_file)
|
||||
|
|
Loading…
Reference in a new issue