
| Path : /opt/postupcp/ |
| Disable Functions : exec,passthru,shell_exec,system System : Linux server-604606.appsiete.com 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 [ Home ][ Zone-h ][ Jumping ][ Symlink ][ Mass Depes ][ Command ] |
| Current File : //opt/postupcp/run_arping |
#!/bin/bash
# Performs arping to gateway from all IP's
source /etc/profile
gateway="$(route -n|awk '$4 == "UG" {print$2}')"
log="/opt/postupcp/run_arping.log"
echo "----$(date)----" >> $log
do_arping() {
sleeptime=$(( ( $RANDOM % 300 ) + 1 ))
echo "Sleeping for $sleeptime seconds" >> $log
sleep $sleeptime
for ip in $(ip -f inet a | awk -F'[ /]' '/inet.*global/ {print $6}');do
arping -c 1 -w 1 -s $ip $gateway >> $log
done
}
do_arping