diff --git a/zlogin b/zlogin index d1956b6..5a50043 100644 --- a/zlogin +++ b/zlogin @@ -78,13 +78,13 @@ if [ ${USER} != "root" ] && [ $(command -v startx) ]; then fi if [ -f $HOME/.ssh/id_rsa ]; then - keychain --agents ssh id_rsa - . $HOME/.keychain/$HOST-sh + [[ ! -f ~/.keychain/$HOST-sh ]] && keychain --agents ssh id_rsa + source ~/.keychain/$HOST-sh fi if [ -f $HOME/.ssh/id_ed25519 ]; then - keychain --agents ssh id_ed25519 - . $HOME/.keychain/$HOST-sh + [[ ! -f ~/.keychain/$HOST-sh ]] && keychain --agents ssh id_ed25519 + source ~/.keychain/$HOST-sh fi # GPG Agent