mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Add minor robustness on cluster scripts
This commit is contained in:
parent
fcdb519770
commit
3188941af2
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Remove the current ejabberd node in a cluster
|
||||
|
||||
@ -36,7 +36,7 @@ exit
|
||||
|
||||
PA=/tmp/clustersetup_$$
|
||||
CTL=$(which ejabberdctl)
|
||||
[ "$CTL" == "" ] && {
|
||||
[ -x "$CTL" ] || {
|
||||
HERE=`which "$0"`
|
||||
BASE=`dirname $HERE`/..
|
||||
ROOTDIR=`cd $BASE; pwd`
|
||||
@ -45,7 +45,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
|
||||
|
Loading…
Reference in New Issue
Block a user