Added bash file for transfer of recordings
This commit is contained in:
parent
16b89bc47d
commit
481a19a17a
|
|
@ -1,10 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
# Configuration
|
||||
PI_USER="pi"
|
||||
PI_HOST="192.168.1.42"
|
||||
REMOTE_FOLDER="/home/pi/data_logs/"
|
||||
PI_USER="hmi"
|
||||
PI_HOST="192.168.1.46"
|
||||
REMOTE_FOLDER="/home/hmi/Desktop/HMI/recordings"
|
||||
LOCAL_FOLDER="/recordings"
|
||||
|
||||
# Prompt for password silently
|
||||
read -s -p "Enter SSH password for $PI_USER@$PI_HOST: " PASSWORD
|
||||
echo ""
|
||||
|
||||
# Sync folder from Raspberry Pi to local
|
||||
rsync -avz --progress "$PI_USER@$PI_HOST:$REMOTE_FOLDER" "$LOCAL_FOLDER"
|
||||
# Run rsync with password
|
||||
sshpass -p "$PASSWORD" scp -r "$PI_USER@$PI_HOST:$REMOTE_FOLDER" "$LOCAL_FOLDER"
|
||||
Loading…
Reference in New Issue
Block a user