Guest User

Delete "~/.cahce/sessions" and promt log out

a guest
Mar 3rd, 2014
636
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. DIR="~/.cache/sessions/"
  3.  
  4. delete_sessions(){
  5.     # Deletes whatever is in DIR
  6.     rm -r -- "$DIR"
  7. }
  8.  
  9. is_directory(){
  10.     if [ -d "$DIR" ]; then
  11.         delete_sessions
  12.     else
  13.         echo "wtf man, it's not there?!"
  14.     fi
  15. }
  16.  
  17. promt_logout() {
  18.     xfce4-session-logout
  19. }
  20.  
  21. is_directory
  22. promt_logout
RAW Paste Data