changes to home assistant, docker images, rustdesk relay

This commit is contained in:
2024-02-28 23:38:15 +01:00
parent 8650c3f6ee
commit c9e4ab6af0
15 changed files with 292 additions and 199 deletions

View File

@@ -73,9 +73,10 @@ let
"\"upgrade-staging.wienbautvor.at IN A 10.254.240.110\""
"\"upgrade-staging.wienwohntbesser.at IN A 10.254.240.110\""
"\"metz.cloonar.com IN A 10.42.99.10\""
"\"firetv-living.cloonar.com IN A 10.42.96.175\""
"\"ps5-living.cloonar.com IN A 10.42.96.176\""
"\"metz.cloonar.multimedia IN A 10.42.99.10\""
"\"ps5.cloonar.multimedia IN A 10.42.99.12\""
"\"xbox.cloonar.multimedia IN A 10.42.99.13\""
"\"switch.cloonar.multimedia IN A 10.42.99.14\""
"\"shellycolorbulb-34945479bc57.cloonar.com IN A 10.42.100.130\""
"\"shellycolorbulb-485519d9a1b2.cloonar.com IN A 10.42.100.131\""
@@ -189,7 +190,7 @@ in {
function readFileUnique() {
readFile "''\$1" ''\$2 | uniq | while IFS=, read -r address hostname
do
if [[ "''\${hostname}" == *.cloonar.com ]] ; then
if echo "''\${1}" | grep -Eq '.*\.(cloonar.com|cloonar.multimedia|cloonar.smart)'; then
echo ''\${hostname} ''\$2 ''\${address}
unbound-control local_data ''\${hostname} ''\$2 ''\${address}
if [[ "''\$2" == "A" ]] ; then
@@ -199,6 +200,28 @@ in {
unbound-control local_data ''\${ip3}.''\${ip2}.''\${ip1}.''\${ip0}.in-addr.arpa. PTR ''\${hostname}
done
fi
else
if [[ "''\$2" == "A" ]] ; then
echo ''\${address} | while IFS=. read -r ip0 ip1 ip2 ip3
do
if [[ "''\${hostname}" != "" ]] && [[ "''\${hostname}" != *. ]]; then
if [[ "''\${ip2}" == 96 ]]; then
unbound-control local_data ''\${hostname}.cloonar.com ''\$2 ''\${address}
fi
if [[ "''\${ip2}" == 97 ]]; then
unbound-control local_data ''\${hostname}.cloonar.com ''\$2 ''\${address}
fi
if [[ "''\${ip2}" == 99 ]]; then
unbound-control local_data ''\${hostname}.cloonar.multimedia ''\$2 ''\${address}
fi
if [[ "''\${ip2}" == 100 ]]; then
unbound-control local_data ''\${hostname}.cloonar.smart ''\$2 ''\${address}
fi
fi
unbound-control local_data ''\${ip3}.''\${ip2}.''\${ip1}.''\${ip0}.ip4.arpa. PTR ''\${hostname}
unbound-control local_data ''\${ip3}.''\${ip2}.''\${ip1}.''\${ip0}.in-addr.arpa. PTR ''\${hostname}
done
fi
fi
done
}