This commit is contained in:
Janis Steiner
2024-09-21 15:45:18 +01:00
parent 4f9d21cd37
commit 9e77ad56f9
2 changed files with 9 additions and 0 deletions

5
scripts/sys0_client.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
ngrok http 80 &
sleep 5
url=$(curl --silent --show-error http://127.0.0.1:4040/api/tunnels | sed -nE 's/.*public_url":"https:..([^"]*).*/\1/p' )
curl --silent "https://SYSTEM0_WEBSERVER_URL/system0/html/api/update_url.php?url=$url&id=ENTER_THE_ID_FOR_THIS_MACHINE_HERE&apikey=YOUR_SYSTEM0_APIKEY&octoapikey=OCTOPRINT_ADMIN_APIKEY"