diff --git a/app/chain/system.py b/app/chain/system.py index 88df3326..1ed91490 100644 --- a/app/chain/system.py +++ b/app/chain/system.py @@ -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))