diff --git a/scripts/home-get-temperatures b/scripts/home-get-temperatures new file mode 100755 index 0000000..50bd776 --- /dev/null +++ b/scripts/home-get-temperatures @@ -0,0 +1,4 @@ +#! /bin/bash +set -e + +http get "http://prometheus.vpn:9090/api/v1/query?query=home_controller_sensor_temperature_None" | jq -r '.data.result.[] | "\(.metric.friendly_name): \(.value.[1])°C"' diff --git a/scripts/rebuild-udm-dns b/scripts/rebuild-udm-dns new file mode 100755 index 0000000..03a50a8 --- /dev/null +++ b/scripts/rebuild-udm-dns @@ -0,0 +1,11 @@ +#! /bin/bash +# Home router gives up on custom DNS configs sometimes. This script rebuilds them +set -e + +echo "SSH-ing into the router to make changes.." +ssh root@10.80.0.1 < /run/dnsmasq.conf.d/local_custom_dns.conf; +echo "server=/0.10.10.in-addr.arpa/10.10.0.1" >> /run/dnsmasq.conf.d/local_custom_dns.conf; +kill \$(cat /run/dnsmasq.pid) +dig gateway.vpn +EOF