diff options
author | Christophe Romain <christophe.romain@process-one.net> | 2015-03-18 22:26:06 +0100 |
---|---|---|
committer | Christophe Romain <christophe.romain@process-one.net> | 2015-03-18 22:26:06 +0100 |
commit | 7976d3eb4810420a26b5e556dd19165243999f37 (patch) | |
tree | 0b7f1759afd4e3b0935d13e62dacb4be07e63a64 /ejabberdctl.template | |
parent | Update 'rsm_in' record element types (diff) |
Fix epmd not in PATH (#484)
Diffstat (limited to 'ejabberdctl.template')
-rwxr-xr-x | ejabberdctl.template | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ejabberdctl.template b/ejabberdctl.template index 685d1981..ba4a5d86 100755 --- a/ejabberdctl.template +++ b/ejabberdctl.template @@ -13,6 +13,7 @@ ERLANG_NODE=ejabberd@localhost SCRIPT_DIR=`cd ${0%/*} && pwd` ERL={{erl}} IEX={{bindir}}/iex +EPMD={{bindir}}/epmd INSTALLUSER={{installuser}} # Compatibility in ZSH @@ -406,13 +407,13 @@ ctlexec() # stop epmd if there is no other running node stop_epmd() { - epmd -names 2>/dev/null | grep -q name || epmd -kill >/dev/null + $EPMD -names 2>/dev/null | grep -q name || epmd -kill >/dev/null } # make sure node not already running and node name unregistered check_start() { - epmd -names 2>/dev/null | grep -q " ${ERLANG_NODE%@*} " && { + $EPMD -names 2>/dev/null | grep -q " ${ERLANG_NODE%@*} " && { ps ux | grep -v grep | grep -q " $ERLANG_NODE " && { echo "ERROR: The ejabberd node '$ERLANG_NODE' is already running." exit 4 @@ -423,7 +424,7 @@ check_start() echo "Shutdown all other erlang nodes, and call 'epmd -kill'." exit 5 } || { - epmd -kill >/dev/null + $EPMD -kill >/dev/null } } } |