fix restart

This commit is contained in:
jxxghp
2025-06-10 07:09:59 +08:00
parent 49dae92b8e
commit 162ba9307d
4 changed files with 33 additions and 61 deletions

View File

@@ -565,24 +565,3 @@ class SystemUtils:
if unique_id:
return unique_id
return None
@staticmethod
def set_system_modified():
"""
设置系统已修改标志
"""
try:
if SystemUtils.is_docker():
Path("/var/log/nginx/__moviepilot__").touch(exist_ok=True)
except Exception as e:
print(f"设置系统修改标志失败: {str(e)}")
@staticmethod
def is_system_reset() -> bool:
"""
检查系统是否已被重置
:return: 如果系统已重置,返回 True否则返回 False
"""
if SystemUtils.is_docker():
return not Path("/var/log/nginx/__moviepilot__").exists()
return False