service deltacloud-condor_refreshd status wasn't reporting the
  correct status, and it was possible to launch many dbomatic
  instances via service deltacloud-dbomatic start. This patch
  fixes both of these issues as they are needed for the recipe.
---
 conf/deltacloud-condor_refreshd |    2 +-
 conf/deltacloud-dbomatic        |   17 +++++++++++------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/conf/deltacloud-condor_refreshd b/conf/deltacloud-condor_refreshd
index 6c0b6d5..7ac29cf 100755
--- a/conf/deltacloud-condor_refreshd
+++ b/conf/deltacloud-condor_refreshd
@@ -68,7 +68,7 @@ case "$1" in
       restart
       ;;
     status)
-     status $REFRESHD_PROG
+     status -p $REFRESHD_PID $REFRESHD_PROG
      RETVAL=$?
      ;;
     *)
diff --git a/conf/deltacloud-dbomatic b/conf/deltacloud-dbomatic
index 8a50098..e4f1f16 100755
--- a/conf/deltacloud-dbomatic
+++ b/conf/deltacloud-dbomatic
@@ -27,14 +27,19 @@ DBOMATIC_PID=/var/run/deltacloud-aggregator/dbomatic.pid
 start() {
     echo -n "Starting deltacloud-dbomatic: "
 
-    daemon --user=$USER $DBOMATIC_PATH/$DBOMATIC_PROG
-    RETVAL=$?
-    if [ $RETVAL -eq 0 ] && touch $DBOMATIC_LOCKFILE ; then
+    if  test -f $DBOMATIC_LOCKFILE ; then
       echo_success
       echo
     else
-      echo_failure
-      echo
+      daemon --user=$USER $DBOMATIC_PATH/$DBOMATIC_PROG
+      RETVAL=$?
+      if [ $RETVAL -eq 0 ] && touch $DBOMATIC_LOCKFILE ; then
+        echo_success
+        echo
+      else
+        echo_failure
+        echo
+      fi
     fi
 }
 
@@ -68,7 +73,7 @@ case "$1" in
       restart
       ;;
     status)
-     status $DBOMATIC_PROG
+     status -p $DBOMATIC_PID $DBOMATIC_PROG
      RETVAL=$?
      ;;
     *)
-- 
1.7.2.3

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to