Add Torrent auto-config

This commit is contained in:
Colin Hebert
2023-04-11 07:37:57 +10:00
parent 65a8285f2e
commit 77a5fc756c
5 changed files with 51 additions and 39 deletions

View File

@@ -0,0 +1,3 @@
#!/command/with-contenv bash
listen_port=$(python3 /py-natpmp/natpmp/natpmp_client.py -g 10.2.0.1 0 0 | sed -E 's/.*?public port ([0-9]+).*?/\1/')
curl -F "json={\"listen_port\": ${listen_port}}" http://localhost:8080/api/v2/app/setPreferences