From 0eb5d6343e2505feeaabb881e665bfcf5c75b3b8 Mon Sep 17 00:00:00 2001 From: pdf Date: Thu, 28 Apr 2011 13:58:40 +1000 Subject: [PATCH] Fix startup script to work with existing ssh-agent Should work with all agents, tested with ssh-agent, and gnome-keyring-daemon --- SparkleShare/sparkleshare.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SparkleShare/sparkleshare.in b/SparkleShare/sparkleshare.in index c32ae6ad..5bd0e20f 100644 --- a/SparkleShare/sparkleshare.in +++ b/SparkleShare/sparkleshare.in @@ -19,7 +19,11 @@ start() { fi echo -n "Starting SparkleShare... " - ssh-agent mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 & + if [ -n "${SSH_AGENT_PID}" -o -n "${SSH_AUTH_SOCK}" ] ; then + mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 & + else + ssh-agent mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 & + fi ( umask 066; echo $! > ${pidfile} ) echo "Done." }