fix
This commit is contained in:
parent
fb78a07662
commit
74caf8a482
@ -46,9 +46,10 @@ class SystemChain(ChainBase, metaclass=Singleton):
|
||||
"""
|
||||
重启系统
|
||||
"""
|
||||
if SystemUtils.is_windows():
|
||||
logger.error("windows暂不支持")
|
||||
if not SystemUtils.is_docker():
|
||||
logger.error("非Docker版本不支持自动更新!")
|
||||
return
|
||||
|
||||
if channel and userid:
|
||||
self.post_message(Notification(channel=channel,
|
||||
title="系统正在更新,请耐心等候!", userid=userid))
|
||||
@ -60,6 +61,7 @@ class SystemChain(ChainBase, metaclass=Singleton):
|
||||
|
||||
# 重启系统
|
||||
os.system("bash /usr/local/bin/mp_update")
|
||||
|
||||
if channel and userid:
|
||||
self.post_message(Notification(channel=channel,
|
||||
title="暂无新版本!", userid=userid))
|
||||
|
Loading…
x
Reference in New Issue
Block a user