From 74caf8a482b23c245ea42ee557437231bec46f86 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Wed, 18 Oct 2023 08:38:30 +0800 Subject: [PATCH] fix --- app/chain/system.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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))