Guest User

Untitled

a guest
Aug 19th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #!/bin/bash
  2. # By Ashfame
  3.  
  4. while true
  5. do
  6. # keep checking for idle dropbox status
  7. STATUS=`dropbox status`
  8.  
  9. if [ $STATUS = 'Idle' ]; then
  10. notify-send "System Shutdown" "System will power off now"
  11. sleep 10
  12. shutdown -P
  13. exit
  14. fi
  15.  
  16. # wait for 10 secs for the next check (iteration)
  17. sleep 10
  18. done
  19.  
  20. exit
Add Comment
Please, Sign In to add comment