You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metron.apache.org by ni...@apache.org on 2016/12/07 21:09:15 UTC

incubator-metron git commit: METRON-585 Pcap Replay Fails to Stop (nickwallen) closes apache/incubator-metron#369

Repository: incubator-metron
Updated Branches:
  refs/heads/master ba2722e7a -> a96c4ed2e


METRON-585 Pcap Replay Fails to Stop (nickwallen) closes apache/incubator-metron#369


Project: http://git-wip-us.apache.org/repos/asf/incubator-metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metron/commit/a96c4ed2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metron/tree/a96c4ed2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metron/diff/a96c4ed2

Branch: refs/heads/master
Commit: a96c4ed2ef4de70b6012d2992d43123d5d4831f1
Parents: ba2722e
Author: nickwallen <ni...@nickallen.org>
Authored: Wed Dec 7 16:05:48 2016 -0500
Committer: Nick Allen <ni...@nickallen.org>
Committed: Wed Dec 7 16:05:48 2016 -0500

----------------------------------------------------------------------
 .../roles/pcap_replay/templates/pcap-replay              | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/a96c4ed2/metron-deployment/roles/pcap_replay/templates/pcap-replay
----------------------------------------------------------------------
diff --git a/metron-deployment/roles/pcap_replay/templates/pcap-replay b/metron-deployment/roles/pcap_replay/templates/pcap-replay
index 1df7337..43ecc82 100644
--- a/metron-deployment/roles/pcap_replay/templates/pcap-replay
+++ b/metron-deployment/roles/pcap_replay/templates/pcap-replay
@@ -73,9 +73,14 @@ case "$1" in
     PID=`cat $PIDFILE`
     cd $DAEMON_PATH
     if [ -f $PIDFILE ]; then
-        kill -HUP $PID
-        printf "%s\n" "Ok"
-        rm -f $PIDFILE
+      while sleep 1
+        echo -n "."
+        kill -0 $PID >/dev/null 2>&1
+      do
+        kill $PID
+      done
+      printf "%s\n" "Ok"
+      rm -f $PIDFILE
     else
         printf "%s\n" "pidfile not found"
     fi