1. 重新初始化

2. 调整为手动更新,优化界面
3. 添加指定服务端口的环境变量
4. 修复获取个人数据返回值错误的bug
This commit is contained in:
ngfchl
2022-08-24 21:02:09 +08:00
parent 943304fe6e
commit 78efd05d66

View File

@@ -1,4 +1,5 @@
import json
import os
import subprocess
from datetime import datetime
@@ -84,7 +85,7 @@ def do_restart(request):
try:
print('重启')
# print(os.system('pwd'))
subprocess.Popen('chmod +x ./update.sh')
subprocess.Popen('chmod +x ./update.sh', shell=True)
subprocess.Popen('./restart.sh')
return JsonResponse(data=CommonResponse.success(
msg='重启指令发送成功!!'
@@ -98,8 +99,8 @@ def do_restart(request):
def do_update(request):
try:
print('更新')
# print(os.system('pwd'))
p = subprocess.Popen('chmod +x ./update.sh')
print(os.system('cat ./update.sh'))
p = subprocess.Popen('chmod +x ./update.sh', shell=True)
subprocess.Popen('./update.sh')
p.wait()