pbxpcitests

This commit is contained in:
2023-02-23 14:35:01 +00:00
parent 3be1178460
commit 3fb0063a0c
4 changed files with 106 additions and 0 deletions

28
pbxnettest Normal file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
ip=192.168.178.234
url=root@$ip
log=$HOME/tmp/pbxnettest_$(date +%y%m%d%H%M%S).log
srcfile=~/tmp/update-image-tfepi-tfepi.swu
n=0
i=0
while [ true ]; do
echo -n "."
scp -q $srcfile $url:/dev/null
r=$?
if [ $r -ne 0 ]; then
echo "Error $n" | tee -a $log
fi
i=$((i+1))
n=$((n+1))
if [ $i -ge 100 ]; then
i=0
echo " $(date +%T) $n" | tee -a $log
fi
read -t 1 -n 1 key
if [ "$key" = "x" ]; then
exit
fi
done