系统更新指令
This commit is contained in:
@@ -135,11 +135,10 @@ class SystemUpdaterPlugin(MessagePluginInterface):
|
|||||||
try:
|
try:
|
||||||
# 使用相对路径调用 restart.sh 脚本
|
# 使用相对路径调用 restart.sh 脚本
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
["./restart.sh"], # 使用相对路径
|
["/home/liuwei/wechatbot/WeChatRobot/restart.sh"], # 使用绝对路径
|
||||||
check=True,
|
check=True,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE,
|
stderr=subprocess.PIPE
|
||||||
cwd=os.path.join(os.path.dirname(__file__)) # 确保在当前目录执行
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# 打印执行结果
|
# 打印执行结果
|
||||||
|
|||||||
Reference in New Issue
Block a user