summaryrefslogtreecommitdiff
path: root/tools/joincluster
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2015-05-13 15:54:28 +0200
committerChristophe Romain <christophe.romain@process-one.net>2015-05-13 15:54:28 +0200
commitdbcfd38c18a29d1170a046eb6cc48da30cd98303 (patch)
tree8412532c20a745cc1424769d786c0b052b4e3da7 /tools/joincluster
parentMerge pull request #503 from weiss/fix-quoting-for-elixir (diff)
Allow run joincluster as non root when ejabberd installed as root (#497)
Diffstat (limited to 'tools/joincluster')
-rwxr-xr-xtools/joincluster3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/joincluster b/tools/joincluster
index e62084bc..b3516d94 100755
--- a/tools/joincluster
+++ b/tools/joincluster
@@ -95,8 +95,7 @@ REMOTENAME=-name
set -o errexit
set -o nounset
-[ -d $SPOOL_DIR ] && rm -Rf $SPOOL_DIR
-mkdir $SPOOL_DIR || error "$SPOOL_DIR cannot be created" 20
+[ -d $SPOOL_DIR ] && rm -Rf $SPOOL_DIR/* || mkdir -p $SPOOL_DIR || error "$SPOOL_DIR cannot be created" 20
[ -w $SPOOL_DIR ] || error "$SPOOL_DIR directory is not writable" 21
mkdir -p $PA || error "$PA cannot be created" 22
cd $PA