mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Fix epmd not in PATH (#484)
This commit is contained in:
parent
1dd23ecb41
commit
7976d3eb48
@ -13,6 +13,7 @@ ERLANG_NODE=ejabberd@localhost
|
|||||||
SCRIPT_DIR=`cd ${0%/*} && pwd`
|
SCRIPT_DIR=`cd ${0%/*} && pwd`
|
||||||
ERL={{erl}}
|
ERL={{erl}}
|
||||||
IEX={{bindir}}/iex
|
IEX={{bindir}}/iex
|
||||||
|
EPMD={{bindir}}/epmd
|
||||||
INSTALLUSER={{installuser}}
|
INSTALLUSER={{installuser}}
|
||||||
|
|
||||||
# Compatibility in ZSH
|
# Compatibility in ZSH
|
||||||
@ -406,13 +407,13 @@ ctlexec()
|
|||||||
# stop epmd if there is no other running node
|
# stop epmd if there is no other running node
|
||||||
stop_epmd()
|
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
|
# make sure node not already running and node name unregistered
|
||||||
check_start()
|
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 " && {
|
ps ux | grep -v grep | grep -q " $ERLANG_NODE " && {
|
||||||
echo "ERROR: The ejabberd node '$ERLANG_NODE' is already running."
|
echo "ERROR: The ejabberd node '$ERLANG_NODE' is already running."
|
||||||
exit 4
|
exit 4
|
||||||
@ -423,7 +424,7 @@ check_start()
|
|||||||
echo "Shutdown all other erlang nodes, and call 'epmd -kill'."
|
echo "Shutdown all other erlang nodes, and call 'epmd -kill'."
|
||||||
exit 5
|
exit 5
|
||||||
} || {
|
} || {
|
||||||
epmd -kill >/dev/null
|
$EPMD -kill >/dev/null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user