ejabberdctl: Escape whitespace in ERL_OPTIONS
authorHolger Weiss <holger@zedat.fu-berlin.de>
Fri, 13 Mar 2015 10:40:23 +0000 (11:40 +0100)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Fri, 13 Mar 2015 10:40:23 +0000 (11:40 +0100)
If ERL_OPTIONS="-opt arg" is specified, make sure the space character
between "-opt" and "arg" is retained.

Fixes #143.

ejabberdctl.template

index d32da0d3a2ceb1b11f8ba73d9c2a157436b422c9..685d198196f41597a719679a9aeda63ef0bbe3d9 100755 (executable)
@@ -112,6 +112,7 @@ ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
 ERL_INETRC=$ETC_DIR/inetrc
 
 # define erl parameters
+ERL_OPTIONS=$(echo $ERL_OPTIONS | sed 's/ /\\ /g')
 ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $ERL_OPTIONS"
 KERNEL_OPTS=""
 if [ "$FIREWALL_WINDOW" != "" ] ; then