mirror of
https://github.com/processone/ejabberd.git
synced 2024-10-31 15:21:38 +01:00
add ejabberdctl ability to check epmd names (TECH-1121)
This commit is contained in:
parent
2ee7642816
commit
3aaebe98f4
@ -136,6 +136,7 @@ export EXEC_CMD
|
|||||||
# start server
|
# start server
|
||||||
start ()
|
start ()
|
||||||
{
|
{
|
||||||
|
check_start
|
||||||
$EXEC_CMD "$ERL \
|
$EXEC_CMD "$ERL \
|
||||||
$NAME $ERLANG_NODE \
|
$NAME $ERLANG_NODE \
|
||||||
-noinput -detached \
|
-noinput -detached \
|
||||||
@ -182,6 +183,7 @@ debug ()
|
|||||||
# start interactive server
|
# start interactive server
|
||||||
live ()
|
live ()
|
||||||
{
|
{
|
||||||
|
check_start
|
||||||
echo "--------------------------------------------------------------------"
|
echo "--------------------------------------------------------------------"
|
||||||
echo ""
|
echo ""
|
||||||
echo "IMPORTANT: ejabberd is going to start in LIVE (interactive) mode."
|
echo "IMPORTANT: ejabberd is going to start in LIVE (interactive) mode."
|
||||||
@ -337,6 +339,26 @@ stop_epmd()
|
|||||||
epmd -names | grep -q name || epmd -kill
|
epmd -names | grep -q name || epmd -kill
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# make sure node not already running and node name unregistered
|
||||||
|
check_start()
|
||||||
|
{
|
||||||
|
epmd -names | grep -q $NODE && {
|
||||||
|
ps ux | grep -q $ERLANG_NODE && {
|
||||||
|
echo "ejabberd is already running."
|
||||||
|
exit 4
|
||||||
|
} || {
|
||||||
|
ps ux | grep beam | grep -v "grep beam" && {
|
||||||
|
echo "ejabberd node is registered, but no ejabberd process has been found."
|
||||||
|
echo "can not kill epmd as other erlang nodes are running."
|
||||||
|
echo "please stop all erlang nodes, and call 'epmd -kill'."
|
||||||
|
exit 5
|
||||||
|
} || {
|
||||||
|
epmd -kill
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# allow sync calls
|
# allow sync calls
|
||||||
wait_for_status()
|
wait_for_status()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user