update smbclient to install the script and create the cron job

This commit is contained in:
Pi
2019-02-25 15:00:59 -05:00
parent 662b6258ee
commit a911344cc6
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#! /bin/bash
file=$(i=$RANDOM
if [ $i -lt 16384 ]; then echo 'test_file_100M'
elif [ $i -lt 24566 ]; then echo 'test_file_200M'
elif [ $i -gt 29490 ]; then echo 'test_file_1G'
else echo 'test_file_500M';
fi)
if pgrep -f test_file >/dev/null
then
exit 0
else
cp /media/smb/$file /home/pi/Documents/smb/all_files_$HOSTNAME.zip
cp /home/pi/Documents/smb/all_files_$HOSTNAME.zip /media/smb/
fi