diff --git a/src/ejabberdctl.template b/src/ejabberdctl.template index 29e298988..931b10236 100644 --- a/src/ejabberdctl.template +++ b/src/ejabberdctl.template @@ -352,7 +352,7 @@ stop_epmd() check_start() { epmd -names | grep -q $NODE && { - ps ux | grep -q $ERLANG_NODE | grep -v grep && { + ps ux | grep -v grep | grep -q $ERLANG_NODE && { echo "ejabberd is already running." exit 4 } || {