[Pkg-cli-apps-commits] [sparkleshare] 06/10: Add stop command (patch by Neil McGovern).
Andrew Shadura
bugzilla at tut.by
Mon Jan 18 13:00:29 UTC 2016
This is an automated email from the git hooks/post-receive script.
andrewsh pushed a commit to branch master
in repository sparkleshare.
commit dc3149a555cb81c4697dd51c72947e7a4573c433
Author: Andrew Shadura <andrew.shadura at collabora.co.uk>
Date: Mon Jan 18 13:57:44 2016 +0100
Add stop command (patch by Neil McGovern).
---
debian/patches/03-add_stop_command.patch | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/debian/patches/03-add_stop_command.patch b/debian/patches/03-add_stop_command.patch
new file mode 100644
index 0000000..74d7564
--- /dev/null
+++ b/debian/patches/03-add_stop_command.patch
@@ -0,0 +1,32 @@
+Description: Add stop command
+Author: Neil McGovern <neilm at debian.org>
+
+--- a/SparkleShare/Linux/sparkleshare.in
++++ b/SparkleShare/Linux/sparkleshare.in
+@@ -8,6 +8,10 @@
+ start() {
+ if [ -n "${SSH_AGENT_PID}" -o -n "${SSH_AUTH_SOCK}" ] ; then
+ mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 &
++ pid=$!
++ uid=`id -u`
++ mkdir -p /var/run/user/$uid/sparkleshare/
++ echo $pid > /var/run/user/$uid/sparkleshare/pidfile
+ else
+ ssh-agent mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" $2 &
+ fi
+@@ -23,6 +27,15 @@
+ curl --insecure --output ~/SparkleShare/.$invite.xml $open
+ start
+ ;;
++ stop|--stop)
++ uid=`id -u`
++ if [ -e /var/run/user/$uid/sparkleshare/pidfile ] ; then
++ pid=`cat /var/run/user/$uid/sparkleshare/pidfile`
++ (kill $pid 2>&1) >/dev/null
++ rm /var/run/user/$uid/sparkleshare/pidfile
++ fi
++ ;;
++
+ *)
+ mono "@expanded_libdir@/@PACKAGE@/SparkleShare.exe" --help
+ ;;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-cli-apps/packages/sparkleshare.git
More information about the Pkg-cli-apps-commits
mailing list