Ensure to kill all git-credential daemon and sockets.

This commit is contained in:
Jeremy Gardais 2018-01-10 16:19:54 +01:00
parent 952736f80c
commit b0d36ad389
1 changed files with 16 additions and 1 deletions

View File

@ -1,9 +1,13 @@
#!/bin/sh #!/bin/sh
# Description: Kill all ssh connections # Description: Kill all ssh connections
# Delete all ssh agents
# Ensure to kill all ssh-agent # Ensure to kill all ssh-agent
# Ensure to kill all gpg-agent # Ensure to kill all gpg-agent
# Ensure to delete everything link to {ssh,gpg}-agent
# Ensure to kill all git-credential sockets
# Kill keepass2
# Kill cached password
# Turn off the screen
# Lock the screen # Lock the screen
### Give an easy way to call this function with a keybind. ### Give an easy way to call this function with a keybind.
## For example with herbstluftwm: "hc keybind $Mod-Shift-c spawn ~/bin/veille.sh" ## For example with herbstluftwm: "hc keybind $Mod-Shift-c spawn ~/bin/veille.sh"
@ -13,20 +17,31 @@
# SSH Connections # SSH Connections
killall ssh killall ssh
rm -rf ~/.ssh/socks/* rm -rf ~/.ssh/socks/*
# SSH Agent # SSH Agent
killall ssh-agent killall ssh-agent
rm -rf /tmp/ssh-* rm -rf /tmp/ssh-*
# GPG Agent # GPG Agent
keychain --agents gpg --clear keychain --agents gpg --clear
kill $(pidof gpg-agent) kill $(pidof gpg-agent)
# Delete everything link to ssh-agent or gpg-agent # Delete everything link to ssh-agent or gpg-agent
rm -rf ~/.keychain/* rm -rf ~/.keychain/*
# git-credential sockets
killall git-credential-cache--daemon
rm -f ~/.git-credential-cache/*
# Keepass2 (killall keepass, both those launch with 'mono' and those launch with 'cli) # Keepass2 (killall keepass, both those launch with 'mono' and those launch with 'cli)
ps ax | grep -v 'awk' | awk '/keepass2/,NF=1' | xargs kill ps ax | grep -v 'awk' | awk '/keepass2/,NF=1' | xargs kill
# Delete sensitive files can contains unwanted clear passwords # Delete sensitive files can contains unwanted clear passwords
rm -f ~/.config/evince/print-settings ~/.config/eog/eog-print-settings.ini ~/.gimp-2.8/print-settings rm -f ~/.config/evince/print-settings ~/.config/eog/eog-print-settings.ini ~/.gimp-2.8/print-settings
# Turn off the screen # Turn off the screen
sleep 3; xset dpms force off sleep 3; xset dpms force off
# Lock the screen # Lock the screen
#i3lock -c 000000 --pointer win -d #i3lock -c 000000 --pointer win -d
i3lock -i /home/jegardai/Images/system/empire_needs_you.png --pointer win -d -e -t i3lock -i /home/jegardai/Images/system/empire_needs_you.png --pointer win -d -e -t