aboutsummaryrefslogtreecommitdiff
path: root/tools/joincluster
diff options
context:
space:
mode:
Diffstat (limited to 'tools/joincluster')
-rwxr-xr-xtools/joincluster6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/joincluster b/tools/joincluster
index b3516d94d..ff2e0380f 100755
--- a/tools/joincluster
+++ b/tools/joincluster
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
# Add the current ejabberd node in a cluster
@@ -56,7 +56,7 @@ function error
PA=/tmp/clustersetup_$$
CTL=$(which ejabberdctl)
-[ "$CTL" == "" ] && {
+[ -x "$CTL" ] || {
HERE=`which "$0"`
BASE=`dirname $HERE`/..
ROOTDIR=`cd $BASE; pwd`
@@ -65,7 +65,7 @@ CTL=$(which ejabberdctl)
CTL=$(which ejabberdctl)
}
echo "Using commands:"
-[ -x $CTL ] && echo $CTL || error "can't find ejabberdctl" 10
+[ -x "$CTL" ] && echo $CTL || error "can't find ejabberdctl" 10
. $CTL stop 2>/dev/null >/dev/null
ERLC=${ERL}c