Advertisement
Guest User

Untitled

a guest
Feb 29th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. USER="mail"
  4. PASS="pass"
  5.  
  6. LOCALDIR="/home/osmc"
  7. REMOTEDIR="/Root/DPF2"
  8. LOG="/home/osmc/log.megasync.log"
  9.  
  10. hostname=`hostname`
  11.  
  12. MEGACOPY='/usr/bin/megatools/megacopy'
  13. MEGARM='/usr/bin/megatools/megarm'
  14. BACKUP_TIME=`date +%c`
  15.  
  16. # And remove it
  17. for i in $DELETE;
  18. do $MEGARM $i
  19. done
  20.  
  21. # Run the synchronization to Mega
  22.  
  23. SYNC=`$MEGACOPY -u $USER -p $PASS --no-progress --local $LOCALDIR --remote $REMOTEDIR`
  24.  
  25. echo "[$BACKUP_TIME][$(hostname)] synchronization to mega done!!" >
  26. $LOG echo "Files removed $DELETE" >> $LOG echo "Files synchronized" >>
  27. $LOG
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement