Created
April 12, 2018 02:28
-
-
Save maiquelleonel/a181a3992f2004ba02da985cf2ce5c4e to your computer and use it in GitHub Desktop.
atualizador de arquivos com rsync
This file contains hidden or 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 | |
| RSYNC=/usr/bin/rsync | |
| SSH=/usr/bin/ssh | |
| KEY=/home/pi/.ssh/remoteuser_rsa.pem | |
| RUSER=remoteuser | |
| RHOST=remotehost.com.br | |
| RPATH=/home/remoteuser/videos/* | |
| LPATH=/home/pi/Videos/ | |
| $RSYNC -razp --force --delete-before --ignore-errors -e "$SSH -i $KEY" $RUSER@$RHOST:$RPATH $LPATH | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment