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