[DRE-commits] [diaspora-installer] 01/01: check for eye before stop

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Sat Aug 29 04:49:17 UTC 2015


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository diaspora-installer.

commit 1dd8ed5c63f73a371783bd1e071fa1d6850ce823
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Sat Aug 29 10:17:36 2015 +0530

    check for eye before stop
---
 debian/changelog            |  6 ++++--
 debian/diaspora-common.init | 15 ++++++++++-----
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 617a4d7..6cb73d4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,9 @@
 diaspora-installer (0.5.2.0+debian5) UNRELEASED; urgency=medium
 
-  * Start diaspora with restart if not running
-  * Handle eye separately for diaspora and diaspora-installer
+  * diaspora-common.init: 
+      Start diaspora with restart if not running
+      Handle eye separately for diaspora and diaspora-installer
+      Check for eye before stop
 
  -- Pirate Praveen <praveen at debian.org>  Fri, 28 Aug 2015 23:01:01 +0530
 
diff --git a/debian/diaspora-common.init b/debian/diaspora-common.init
index bb34dce..d33b148 100644
--- a/debian/diaspora-common.init
+++ b/debian/diaspora-common.init
@@ -132,11 +132,16 @@ case "$1" in
     ;;
   stop)
     [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
-    do_stop
-    case "$?" in
-        0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-        2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
-    esac
+    if ! check_eye
+    then
+        log_action_msg "Eye not found, Diaspora is NOT RUNNING"
+    else
+	do_stop
+    	case "$?" in
+        	0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+	        2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	esac
+    fi
     ;;
   status)
     log_daemon_msg 'Checking for running Diaspora processes'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/diaspora-installer.git



More information about the Pkg-ruby-extras-commits mailing list