Archived
1
0
Fork 0

Kill others ssh-agent before relaunching one

This commit is contained in:
Mercier Pierre-Olivier 2013-09-16 18:58:36 +02:00
parent 4649360306
commit b03703bf96

View file

@ -14,6 +14,7 @@ launch_screen()
if [ -n "$3" ] && [ -f "$3" ]
then
TMP=`$SU -c 'mktemp' intradmin`
$SU -c "killall ssh-agent" intradmin
$SU -c "ssh-agent" intradmin > "$TMP"
$SU -c ". $TMP; ssh-add '$3'" intradmin
CMD=". $TMP; ssh-add -l; echo; $CMD"