try to reuse cloudflared file
This commit is contained in:
parent
d37c94bcd9
commit
20261049c9
1 changed files with 11 additions and 5 deletions
|
@ -2143,8 +2143,14 @@ def setuptunnel():
|
|||
tunnelproc.wait()
|
||||
|
||||
if os.name == 'nt':
|
||||
if os.path.exists("cloudflared.exe"):
|
||||
print("Cloudflared file exists, reusing it...")
|
||||
else:
|
||||
print("Downloading Cloudflare Tunnel for Windows...")
|
||||
subprocess.run("curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-windows-amd64.exe -o cloudflared.exe", shell=True, capture_output=True, text=True, check=True, encoding='utf-8')
|
||||
else:
|
||||
if os.path.exists("cloudflared-linux-amd64"):
|
||||
print("Cloudflared file exists, reusing it...")
|
||||
else:
|
||||
print("Downloading Cloudflare Tunnel for Linux...")
|
||||
subprocess.run("curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o cloudflared-linux-amd64", shell=True, capture_output=True, text=True, check=True, encoding='utf-8')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue