Qilan2 commited on
Commit
37b9055
·
verified ·
1 Parent(s): 82c0a30

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +11 -7
server.py CHANGED
@@ -128,11 +128,14 @@ def sync2():
128
  os.system(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' /sillytavern/ root@{frp_url}:/sillytavern/")
129
  threading.Thread(target=sync2, daemon=True).start()
130
  def sync():
131
- os.system("rm -r /rsync.py /sync.sh")
132
- os.system("wget -O /rsync.py https://huggingface.co/datasets/Qilan2/st-server/resolve/main/rsync.py")
133
- os.system("wget -O /sync.sh https://huggingface.co/datasets/Qilan2/st-server/resolve/main/sync.sh")
134
- os.system("chmod +x /sync.sh")
135
- os.system("chmod +x /sync.py")
 
 
 
136
  # subprocess.Popen(['sh','/sync.sh'])
137
  subprocess.Popen(['sh', '/sync.sh', frp_url, ssh_port], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
138
 
@@ -276,6 +279,7 @@ def SillyTavern():
276
  # ]
277
  # run_commands(commands)
278
  # SillyTavern()
279
- threading.Thread(target=SillyTavern, daemon=True).start()
280
- check_api1()
281
  # frp()
 
 
128
  os.system(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' /sillytavern/ root@{frp_url}:/sillytavern/")
129
  threading.Thread(target=sync2, daemon=True).start()
130
  def sync():
131
+ commands = [
132
+ "rm -r /rsync.py /sync.sh",
133
+ "wget -O /rsync.py https://huggingface.co/datasets/Qilan2/st-server/resolve/main/rsync.py",
134
+ "wget -O /sync.sh https://huggingface.co/datasets/Qilan2/st-server/resolve/main/sync.sh",
135
+ "chmod +x /sync.sh",
136
+ "chmod +x /rsync.py"
137
+ ]
138
+ os.system(command)
139
  # subprocess.Popen(['sh','/sync.sh'])
140
  subprocess.Popen(['sh', '/sync.sh', frp_url, ssh_port], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
141
 
 
279
  # ]
280
  # run_commands(commands)
281
  # SillyTavern()
282
+ # threading.Thread(target=SillyTavern, daemon=True).start()
283
+ # check_api1()
284
  # frp()
285
+ sync()