Update check-node

This commit is contained in:
Manevolent 2023-04-13 01:02:43 -06:00 committed by GitHub
parent 64ee70380b
commit 37867bd980
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1 +1,9 @@
#!/bin/ash
num_macs=`ls /tmp/tinc/peer/$NODE/mac | wc -l`
if [ "$num_macs" = "1" ]; then
mac=`ls /tmp/tinc/peer/$NODE/mac`
ips=`ls /tmp/tinc/peer/$NODE/ip`
echo $ips | xargs -n 1 -I {} "[ARP] Adding {} to the table..."
echo $ips | xargs -n 1 -I {} arp -s {} $mac
fi