.
This commit is contained in:
4
scripts/README.md
Normal file
4
scripts/README.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# sys0_client.sh
|
||||||
|
This script can be installed into rc.local to start after every boot.<br>
|
||||||
|
WARNING! before installing change the MACHINE_ID and the SYSTEM=_WEBSERVER_URL<br>
|
||||||
|
Be sure to give every octoprint machine a seperate id.<br>
|
||||||
5
scripts/sys0_client.sh
Normal file
5
scripts/sys0_client.sh
Normal 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"
|
||||||
Reference in New Issue
Block a user