Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- LOCALDIR=$HOME/Music/
- REMOTEDIR=$HOME/Music/Hyperion/
- SERVER=192.168.1.X
- if [[ `ifconfig|grep "192.168.1.Y"|cut --delimiter=' ' -f 10` == "192.168.1.Y" ]]; then
- notify-send "Syncing with Server..."
- echo "Fetching..."
- rsync --rsh=ssh -aizuKL --log-file=$HOME/music_sync_log $SERVER:$REMOTEDIR $LOCALDIR
- echo "Sending..."
- rsync --rsh=ssh -aizuKL --log-file=$HOME/music_push_log $LOCALDIR $SERVER:$REMOTEDIR
- echo "done."
- notify-send "Complete" "Syncing complete"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement