From 740533203489974ad68ded495244cedcfe68549c Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sun, 3 Oct 2010 20:55:35 +0100 Subject: [PATCH] [cli] only start a new ssh-agent if there isn't one already --- SparkleShare/sparkleshare.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SparkleShare/sparkleshare.in b/SparkleShare/sparkleshare.in index 90b600fa..1e007365 100644 --- a/SparkleShare/sparkleshare.in +++ b/SparkleShare/sparkleshare.in @@ -16,8 +16,11 @@ start() { echo -n "Starting SparkleShare... " mkdir -p /tmp/sparkleshare/ - # Start SparkleShare with an agent in the background and save the pid - ssh-agent mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 & + if [ -n "$SSH_AUTH_SOCK" ]; then + mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 & + else + ssh-agent mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 & + fi echo $! > ${pidfile} echo "Done." }