Qilan2 commited on
Commit
39bf7c6
·
verified ·
1 Parent(s): f50d35d

Update Card_Hub.py

Browse files
Files changed (1) hide show
  1. Card_Hub.py +7 -5
Card_Hub.py CHANGED
@@ -474,13 +474,14 @@ def monitor_port():
474
  time.sleep(5) # 每5秒检查一次
475
  def Run_SillyTavern():
476
  os.chdir('/Card_Hub/RoleCardSite')
 
477
  try:
478
  # 启动 Node.js 服务器,并将输出重定向到 /dev/null
479
- subprocess.run(f'yes | sh {data_folder}/start.sh', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
480
- subprocess.run(f'yes | sh {data_folder}/start.sh', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
481
- subprocess.run(f'yes | sh {data_folder}/start.sh', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
482
- subprocess.run(f'yes | sh {data_folder}/start.sh', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
483
- subprocess.run(f'yes | sh {data_folder}/start.sh', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
484
  print("已尝试启动 server.js")
485
  except subprocess.CalledProcessError as e:
486
  print(f"命令失败,返回码: {e.returncode}")
@@ -531,6 +532,7 @@ def SillyTavern():
531
  os.system("mv /Card_Hub.ctk card-hub.tar.gz")
532
  os.system("mv /card_Hub.ctk card-hub.tar.gz")
533
  os.system("ls /")
 
534
  os.system(f"tar -xvpf /card-hub.tar.gz -C / --use-compress-program=pigz > /dev/null")
535
 
536
  print('更新文件')
 
474
  time.sleep(5) # 每5秒检查一次
475
  def Run_SillyTavern():
476
  os.chdir('/Card_Hub/RoleCardSite')
477
+ os.system("ls")
478
  try:
479
  # 启动 Node.js 服务器,并将输出重定向到 /dev/null
480
+ subprocess.run(f'yes | sh ./start.sh', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
481
+ subprocess.run(f'yes | sh ./start.sh', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
482
+ subprocess.run(f'yes | sh ./start.sh', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
483
+ subprocess.run(f'yes | sh ./start.sh', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
484
+ subprocess.run(f'yes | sh ./start.sh', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
485
  print("已尝试启动 server.js")
486
  except subprocess.CalledProcessError as e:
487
  print(f"命令失败,返回码: {e.returncode}")
 
532
  os.system("mv /Card_Hub.ctk card-hub.tar.gz")
533
  os.system("mv /card_Hub.ctk card-hub.tar.gz")
534
  os.system("ls /")
535
+ os.system("ls /Card-Hub")
536
  os.system(f"tar -xvpf /card-hub.tar.gz -C / --use-compress-program=pigz > /dev/null")
537
 
538
  print('更新文件')