[cli] only start a new ssh-agent if there isn't one already
This commit is contained in:
parent
d3e9a4dc3a
commit
7405332034
|
@ -16,8 +16,11 @@ start() {
|
||||||
|
|
||||||
echo -n "Starting SparkleShare... "
|
echo -n "Starting SparkleShare... "
|
||||||
mkdir -p /tmp/sparkleshare/
|
mkdir -p /tmp/sparkleshare/
|
||||||
# Start SparkleShare with an agent in the background and save the pid
|
if [ -n "$SSH_AUTH_SOCK" ]; then
|
||||||
|
mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 &
|
||||||
|
else
|
||||||
ssh-agent mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 &
|
ssh-agent mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 &
|
||||||
|
fi
|
||||||
echo $! > ${pidfile}
|
echo $! > ${pidfile}
|
||||||
echo "Done."
|
echo "Done."
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue