Launch ssh-agent if source file is unavailable

This commit is contained in:
Jeremy Gardais 2019-02-19 15:14:51 +01:00
parent 0bb4f5a1b7
commit dfb7d0f727
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 4 additions and 4 deletions

8
zlogin
View File

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