diff options
author | CruiseDevice | 2018-02-19 15:01:22 +0530 |
---|---|---|
committer | CruiseDevice | 2018-02-19 15:01:22 +0530 |
commit | b84648fa3730d8b258bbc4ada0dcbde5a033f747 (patch) | |
tree | d97bfe8f70e43a58a2d7f8fe7a61a00554ba4f14 /sbhs_server/scan_rpis.sh | |
parent | 6f76f85bc264a58cea717ca8f8bd60b411828dd5 (diff) | |
download | SBHS-2018-Rpi-b84648fa3730d8b258bbc4ada0dcbde5a033f747.tar.gz SBHS-2018-Rpi-b84648fa3730d8b258bbc4ada0dcbde5a033f747.tar.bz2 SBHS-2018-Rpi-b84648fa3730d8b258bbc4ada0dcbde5a033f747.zip |
initial commit
Diffstat (limited to 'sbhs_server/scan_rpis.sh')
-rwxr-xr-x[-rw-r--r--] | sbhs_server/scan_rpis.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbhs_server/scan_rpis.sh b/sbhs_server/scan_rpis.sh index 14edac1..a3bf724 100644..100755 --- a/sbhs_server/scan_rpis.sh +++ b/sbhs_server/scan_rpis.sh @@ -5,6 +5,10 @@ cd sbhs_server mkdir -p RPi_data mkdir -p RPi_data/map RPi_data/report +DIR="$( cd "$( dirname "$0" )" && pwd )" +cd $DIR + + # Get map_machine_ids.txt and server reports from all connected Raspberry Pi's while read -r ip do @@ -12,7 +16,7 @@ do curl -o RPi_data/map/$ip.txt $ip/map_machine_ids.txt curl -o RPi_data/report/$ip.txt $ip/report.json rsync -arz --exclude="django_error.log" -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress pi@$ip:/home/pi/sbhs-pi/log/ /home/vlabs-sbhs/code/sbhs/log/ - rsync -arz --remove-source-files -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress pi@$ip:/home/pi/sbhs-pi/experiments/ /home/vlabs-sbhs/code/sbhs/experiments/ + rsync -arz --remove-source-files --rsync-path="sudo rsync" -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress pi@$ip:/home/pi/sbhs-pi/experiments/ /home/vlabs-sbhs/code/sbhs/experiments/ done < "RPi_data/ipaddrs.txt" # Execute script to create IP map |