Fixed SSH-Agent startup and keyaddding

This commit is contained in:
Sheppy
2017-05-11 14:10:13 +02:00
parent c98e6f4ff2
commit e94b1f96a4
2 changed files with 12 additions and 7 deletions

View File

@@ -14,12 +14,17 @@ xsetroot -solid '#5A8E3A'
hc keyunbind --all
pkill dunst
pkill xautolock
pkill -s 15 hl_pracct #send SIGTERM for correct termination during write
pkill -s 15 hl_pracct #send SIGTERM for correct termination during write
pkill ssh-agent #correctly terminate the current agent
#variables
Mod=Mod4 # Use the super key as the main modifier
######### MACHINE SPECIFIC SETUP #########
### All Machines ####
if [ -f $HOME/.config/agent_socket ]; then
eval `ssh-agent -a /tmp/ssh-$(cat $HOME/.config/agent_socket)`
fi
### Atlantis PC-specific setup ###
if [[ "$HOST" == "atlantispc" ]]; then
hc detect_monitors

12
zshrc
View File

@@ -48,6 +48,11 @@ bindkey '^R' history-incremental-pattern-search-backward
zmodload zsh/complist #bessere listen
autoload -Uz compinit; compinit #completioni
### SSH-AGENT ###
if [ -f $HOME/.config/agent_socket ]; then
export SSH_AUTH_SOCK=/tmp/ssh-$(cat $HOME/.config/agent_socket)
fi
### UMASK ###
umask 077
@@ -195,12 +200,7 @@ alias l="ls -lh --color=auto"
## SSH-KEYS ##
gitssh=~/.ssh/gitrsa
function key(){
if [[ -z $SSH_AUTH_SOCK ]]; then
eval `ssh-agent`
fi
ssh-add $gitssh
}
ssh-add $gitssh
## ROOT ##
alias udev_reload="udevadm control --reload-rules && udevadm trigger" #reload all udevrules on the fly