diff --git a/plugins/system_updater/main.py b/plugins/system_updater/main.py index 1da9efe..5bc2195 100644 --- a/plugins/system_updater/main.py +++ b/plugins/system_updater/main.py @@ -135,11 +135,10 @@ class SystemUpdaterPlugin(MessagePluginInterface): try: # 使用相对路径调用 restart.sh 脚本 result = subprocess.run( - ["./restart.sh"], # 使用相对路径 + ["/home/liuwei/wechatbot/WeChatRobot/restart.sh"], # 使用绝对路径 check=True, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - cwd=os.path.join(os.path.dirname(__file__)) # 确保在当前目录执行 + stderr=subprocess.PIPE ) # 打印执行结果