ejabberdctl.template: Show meaningful error when ERL_DIST_PORT is in use
This commit is contained in:
+11
-1
@@ -312,7 +312,17 @@ stop_epmd()
|
||||
# if all ok, ensure runtime directory exists and make it current directory
|
||||
check_start()
|
||||
{
|
||||
[ -n "$ERL_DIST_PORT" ] && return
|
||||
[ -n "$ERL_DIST_PORT" ] && {
|
||||
netstat -nl | grep ":5210" >/dev/null && {
|
||||
echo "Error: The file ejabberdctl.cfg has configured ERL_DIST_PORT=$ERL_DIST_PORT"
|
||||
echo " but the port 5210 is already in use."
|
||||
echo " Stop that program or configure a different ERL_DIST_PORT"
|
||||
echo ""
|
||||
netstat -nlp | grep ":5210"
|
||||
echo ""
|
||||
}
|
||||
return
|
||||
}
|
||||
"$EPMD" -names 2>/dev/null | grep -q " ${ERLANG_NODE%@*} " && {
|
||||
pgrep -f "$ERLANG_NODE" >/dev/null && {
|
||||
echo "ERROR: The ejabberd node '$ERLANG_NODE' is already running."
|
||||
|
||||
Reference in New Issue
Block a user