2
0

Explode overlay tar

This commit is contained in:
2021-02-23 00:32:51 +02:00
parent 2a48e50ade
commit 9327fe6000
10 changed files with 690 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
dig -t ANY @224.0.0.251 -p5353 +noall +answer _butterknife._tcp.local | grep "IN SRV" | while read line; do
hostname=$(echo $line | cut -d " " -f 8)
address=$(dig +short +noall +answer @224.0.0.251 -p5353 $hostname | head -n1)
port=$(echo $line | cut -d " " -f 7)
title=$(echo $line | cut -d "." -f 1 | sed -e 's/\032/ /g')
if [ $port -eq 80 ]; then
echo "http://$address \"$title\""
else
echo "http://$address:$port \"$title\""
fi
done