diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-02-27 07:20:27 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-02-27 07:20:27 +0200 |
commit | fa5d6becb482da75e65683b0ae690d35fa3eade6 (patch) | |
tree | 131bae638ebcdde7179620a0b0b5153aa36b927a /bin/ak-cjdns-scanner | |
parent | 1da7813fe8dab6deb3bcbcfe79f4ad44c5f7fe0c (diff) | |
download | arching-kaos-tools-fa5d6becb482da75e65683b0ae690d35fa3eade6.tar.gz arching-kaos-tools-fa5d6becb482da75e65683b0ae690d35fa3eade6.tar.bz2 arching-kaos-tools-fa5d6becb482da75e65683b0ae690d35fa3eade6.zip |
Refactor Arching Kaos ID to node_info
Diffstat (limited to 'bin/ak-cjdns-scanner')
-rwxr-xr-x | bin/ak-cjdns-scanner | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/ak-cjdns-scanner b/bin/ak-cjdns-scanner index aee1fd2..81c3814 100755 --- a/bin/ak-cjdns-scanner +++ b/bin/ak-cjdns-scanner @@ -13,18 +13,18 @@ dumpLinks \ | uniq \ | while read -r ip || [ -n "$ip" ] do - akid="`curl \ + node_info="`curl \ -A 'akd/0.1.0; https://github.com/arching-kaos' \ --connect-timeout 3 \ - "http://[$(publictoip6 $ip)]:8610/v0/akid" 2>/dev/null`" + "http://[$(publictoip6 $ip)]:8610/v0/node_info" 2>/dev/null`" if [ "$?" == "0" ] then if [ "$counter" -ne "0" ] then printf ',' >> walk.aknet fi - printf '{"cjdnsPublicKey":"%s","cjdnsIp":"%s","akid":%s}' \ - "$ip" "`publictoip6 $ip`" "$akid" >> walk.aknet + printf '{"cjdns":{"public_key":"%s","ip":"%s"},"node_info":%s}' \ + "$ip" "`publictoip6 $ip`" "$node_info" >> walk.aknet counter="`expr $counter + 1`" fi done |