diff --git a/download_recordings b/download_recordings index 54c487f..6689398 100644 --- a/download_recordings +++ b/download_recordings @@ -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" \ No newline at end of file