Created
October 6, 2015 05:52
-
-
Save duchenpaul/8268e32553d86134ca48 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
zip -r ~/reaver_backup_`date +"%Y%m%d"`.zip /usr/local/etc/reaver; | |
echo 'Done zip!' | |
ssh -i /root/.ssh/id_rsa_3072 pi@192.168.31.179 <<'ENDSSH' | |
#commands to run on remote host | |
cd ~/; | |
rm reaver_backup_*.zip; | |
exit | |
ENDSSH | |
echo 'removing old file done' | |
scp -i /root/.ssh/id_rsa_3072 ~/reaver_backup*.zip pi@192.168.31.179:~/; | |
echo Done transfer | |
rm reaver_backup*.zip; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment