From fb18ff17d3795541ce4fec48a74e8056350ced62 Mon Sep 17 00:00:00 2001 From: codingogre Date: Thu, 20 Oct 2016 13:39:18 +0000 Subject: [PATCH] JIRA MINIFI-124. -The active_pid() function kill -s 0 returns 0 on success (PID is currently running), yet the if statement in stop case statement is checking for 0 as a failure condition. --- bin/minifi.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/minifi.sh b/bin/minifi.sh index ef772e6bcd..dca94f3a43 100755 --- a/bin/minifi.sh +++ b/bin/minifi.sh @@ -174,7 +174,7 @@ case "\$1" in echo Starting MiNiFi with PID \${pid} and pid file \${pid_file} ;; stop) - if [ \$(active_pid \${saved_pid}) -le 0 ]; then + if [ \$(active_pid \${saved_pid}) -ne 0 ]; then echo "MiNiFi is not currently running." else echo "Stopping MiNiFi (PID: \${saved_pid})." @@ -274,7 +274,7 @@ case "$1" in echo Starting MiNiFi with PID ${pid} and pid file ${pid_file} ;; stop) - if [ $(active_pid ${saved_pid}) -le 0 ]; then + if [ $(active_pid ${saved_pid}) -ne 0 ]; then echo "MiNiFi is not currently running." else echo "Stopping MiNiFi (PID: ${saved_pid})."