Sécurise un peu plus la mise en veille.

This commit is contained in:
Jeremy Gardais 2014-09-23 01:11:00 +02:00
parent 440f660603
commit c542dee1b3
1 changed files with 20 additions and 7 deletions

View File

@ -1,11 +1,24 @@
#!/bin/bash #!/bin/sh
### Petit script qui: # Description: Kill all ssh connections
## supprime les agents ssh qui tourent # Delete all ssh agents
## met en veille la machine # Ensure to kill all ssh-agent
# Ensure to kill all gpg-agent
# Lock the screen
### Give an easy way to call this function with a keybind.
## For example with herbstluftwm: "hc keybind $Mod-Shift-c spawn ~/bin/veille.sh"
### Le but étant de simplifier l'appel à ces fonctionnalités depuis un keybind ## depend: i3lock
## Sous herbstluftwm par exemple: "hc keybind $Mod-Shift-c spawn ~/bin/veille.sh"
keychain --clear && rm -rf ~/.keychain/* # SSH Connections
killall ssh
rm -rf ~/.ssh/socks/*
# SSH Agent
killall ssh-agent
rm -rf /tmp/ssh-*
# GPG Agent
killall gpg-agent
# Delete everything link to ssh-agent or gpg-agent
rm -rf ~/.keychain/*
# Lock the screen
i3lock -c 000000 --pointer win -d i3lock -c 000000 --pointer win -d