Files
dsfin-ansible/roles/smbclient/files/smb-session.sh
Pi e83720a1c3 -adjust smb traffic amounts
-adjust nrpe config to match new smb traffic file sizes
2019-03-26 10:05:29 -04:00

19 lines
360 B
Bash
Executable File

#! /bin/bash
file=$(i=$RANDOM
if [ $i -lt 20000 ]; then echo 'test_file_50M'
elif [ $i -lt 29490 ]; then echo 'test_file_100M'
elif [ $i -gt 31129 ]; then echo 'test_file_500M'
else echo 'test_file_200M';
fi)
cd ~/Documents/smb
if pgrep -f test_file >/dev/null
then
exit 0
else
smbclient //192.168.198.2/share -c "get $file" -A ~/.credentials
fi