mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Merge pull request #748 from joudinet/bashisms
Remove bashisms in {join,leave}cluster scripts
This commit is contained in:
commit
825f4fcc35
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Add the current ejabberd node in a cluster
|
# Add the current ejabberd node in a cluster
|
||||||
|
|
||||||
@ -15,7 +15,7 @@
|
|||||||
# 30 : network issue
|
# 30 : network issue
|
||||||
# 31 : node names incompatibility
|
# 31 : node names incompatibility
|
||||||
|
|
||||||
function error
|
error()
|
||||||
{
|
{
|
||||||
echo "Error: $1" >&2
|
echo "Error: $1" >&2
|
||||||
exit $2
|
exit $2
|
||||||
@ -67,7 +67,7 @@ CTL=$(which ejabberdctl)
|
|||||||
echo "Using commands:"
|
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
|
$CTL stop 2>/dev/null >/dev/null
|
||||||
ERLC=${ERL}c
|
ERLC=${ERL}c
|
||||||
|
|
||||||
[ -x $ERL ] && echo $ERL || error "can't find erl" 11
|
[ -x $ERL ] && echo $ERL || error "can't find erl" 11
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Remove the current ejabberd node in a cluster
|
# Remove the current ejabberd node in a cluster
|
||||||
|
|
||||||
@ -11,7 +11,7 @@
|
|||||||
# 12 : erlc not found
|
# 12 : erlc not found
|
||||||
# 22 : temporary dir can not be created
|
# 22 : temporary dir can not be created
|
||||||
|
|
||||||
function error
|
error()
|
||||||
{
|
{
|
||||||
echo "Error: $1" >&2
|
echo "Error: $1" >&2
|
||||||
exit $2
|
exit $2
|
||||||
@ -45,7 +45,7 @@ CTL=$(which ejabberdctl)
|
|||||||
echo "Using commands:"
|
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
|
$CTL stop 2>/dev/null >/dev/null
|
||||||
ERLC=${ERL}c
|
ERLC=${ERL}c
|
||||||
|
|
||||||
[ -x $ERL ] && echo $ERL || error "can't find erl" 11
|
[ -x $ERL ] && echo $ERL || error "can't find erl" 11
|
||||||
|
Loading…
Reference in New Issue
Block a user