Advertisement
Guest User

Untitled

a guest
Aug 6th, 2016
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1.  
  2. #!/bin/bash
  3.  
  4. # While there is a connection, the script checks every 120 secs if
  5. # the dropbox status is "Dropbox isn't running" or "Connecting",
  6. # and if so, it reconnects the service. Could start from .xinitrc.
  7.  
  8. while true; do
  9. ping -c 1 www.google.com 1>/dev/null 2>/dev/null
  10. if [ "$?" = 0 ]; then
  11. dropbox status | egrep 'isn|Connecting'>null
  12. if [ "$?" = 0 ]; then
  13. dropbox stop
  14. dropbox start
  15. fi
  16. fi
  17. sleep 2m
  18. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement