dotfiles

configuration files
git clone https://pi.duncano.de/git/dotfiles.git
Log | Files | Refs | README

commit a8cec0197a28b6a5e3793eb2a11b002fcf3ac59d
parent 06e0cde4ff9ea046e6e2d7b4f00623d81ccf1a9c
Author: Duncaen <mail@duncano.de>
Date:   Thu, 17 Mar 2016 18:54:18 +0100

add ssh-agent config

Diffstat:
mksh.d/00-ssh-agent.sh | 9+++++++++
service/ssh-agent | 2++
sv/ssh-agent/check | 0
sv/ssh-agent/finish | 5+++++
sv/ssh-agent/run | 4++++
5 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/mksh.d/00-ssh-agent.sh b/mksh.d/00-ssh-agent.sh @@ -0,0 +1,9 @@ +source_ssh_agent() { + [ -r ~/.cache/ssh-agent-info ] && . ~/.cache/ssh-agent-info +} + +check_ssh_agent() { + test -e "/proc/${SSH_AUTH_SOCK#*.}" +} + +[ ! "$SSH_AUTH_SOCK" ] && source_ssh_agent diff --git a/service/ssh-agent b/service/ssh-agent @@ -0,0 +1 @@ +/home/duncan/sv/ssh-agent/+ \ No newline at end of file diff --git a/sv/ssh-agent/check b/sv/ssh-agent/check diff --git a/sv/ssh-agent/finish b/sv/ssh-agent/finish @@ -0,0 +1,5 @@ +#!/bin/sh + +[ -r ./conf ] && . ./conf +rm -f ${SSH_AGENT_INFO_FILE:=~/.cache/ssh-agent-info} +exit 0 diff --git a/sv/ssh-agent/run b/sv/ssh-agent/run @@ -0,0 +1,4 @@ +#!/bin/sh + +[ -r ./conf ] && . ./conf +exec ssh-agent -D > ${SSH_AGENT_INFO_FILE:=~/.cache/ssh-agent-info}