mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
1. 重新初始化
2. 调整为手动更新,优化界面 3. 添加指定服务端口的环境变量 4. 修复获取个人数据返回值错误的bug
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user