系统更新指令
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
# 打印执行结果
|
||||
|
||||
Reference in New Issue
Block a user