This commit is contained in:
jxxghp 2023-10-18 08:38:30 +08:00
parent fb78a07662
commit 74caf8a482

View File

@ -46,9 +46,10 @@ class SystemChain(ChainBase, metaclass=Singleton):
""" """
重启系统 重启系统
""" """
if SystemUtils.is_windows(): if not SystemUtils.is_docker():
logger.error("windows暂不支持") logger.error("非Docker版本不支持自动更新")
return return
if channel and userid: if channel and userid:
self.post_message(Notification(channel=channel, self.post_message(Notification(channel=channel,
title="系统正在更新,请耐心等候!", userid=userid)) title="系统正在更新,请耐心等候!", userid=userid))
@ -60,6 +61,7 @@ class SystemChain(ChainBase, metaclass=Singleton):
# 重启系统 # 重启系统
os.system("bash /usr/local/bin/mp_update") os.system("bash /usr/local/bin/mp_update")
if channel and userid: if channel and userid:
self.post_message(Notification(channel=channel, self.post_message(Notification(channel=channel,
title="暂无新版本!", userid=userid)) title="暂无新版本!", userid=userid))