mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 09:01:38 +00:00
commit
03270ed21c
|
@ -265,8 +265,16 @@ def update_version_stamp(version, fn=get_version_stamp_file()):
|
|||
fp.write(version + '\n')
|
||||
|
||||
def wait_for_mysql():
|
||||
tried = False
|
||||
while not exists('/var/run/mysqld/mysqld.sock'):
|
||||
logdbg('waiting for mysql server to be ready')
|
||||
"""
|
||||
Try to solve the MySQL startup failure caused by the permission problem
|
||||
caused by the MySQL user's uid change.
|
||||
"""
|
||||
if not tried:
|
||||
os.system('rm /var/lib/mysql/tc.log -f && chown -R mysql.mysql /var/lib/mysql/')
|
||||
tried = True
|
||||
time.sleep(2)
|
||||
logdbg('mysql server is ready')
|
||||
|
||||
|
|
Loading…
Reference in a new issue