mirror of
https://github.com/chaitin/SafeLine.git
synced 2026-01-31 13:53:33 +08:00
fix: clean image when uninstall
This commit is contained in:
@@ -384,6 +384,10 @@ texts = {
|
||||
'restart': {
|
||||
'en': 'RESTART',
|
||||
'zh': '重启'
|
||||
},
|
||||
'wait-mgt-health': {
|
||||
'en': 'Wait for safeline-mgt healthy',
|
||||
'zh': '等待 safeline-mgt 启动'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -927,7 +931,7 @@ def reset_admin():
|
||||
break
|
||||
elif p[0] != 0:
|
||||
log.debug("get safeline-mgt status error: "+str(p[2]))
|
||||
log.info("wait safeline-mgt healthy, sleep 5s")
|
||||
log.info(text('wait-mgt-health'))
|
||||
time.sleep(5)
|
||||
proc = exec_command('docker exec safeline-mgt /app/mgt-cli reset-admin --once',shell=True)
|
||||
if proc[0] != 0:
|
||||
@@ -1163,6 +1167,8 @@ def uninstall():
|
||||
log.error(text('fail-to-docker-down'))
|
||||
return
|
||||
|
||||
image_clean()
|
||||
|
||||
try:
|
||||
shutil.rmtree(safeline_path)
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user