]> granicus.if.org Git - ejabberd/commitdiff
Replace bash-specific syntax in ejabberdctl
authorHolger Weiss <holger@zedat.fu-berlin.de>
Sun, 20 Jul 2014 11:24:28 +0000 (13:24 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Sun, 20 Jul 2014 11:24:28 +0000 (13:24 +0200)
Use plain POSIX shell syntax to match ".yml" configuration file names.
This is also slightly more correct, as it matches ".yml" only at the
*end* of the file name.

ejabberdctl.template

index 7a1f5ee986608f0dfb9436605bf6ccb9e168a919..9aca75c674258005beb3b28981712c4da5d05354 100755 (executable)
@@ -127,7 +127,7 @@ else
 fi
 
 # define ejabberd environment parameters
-if [ "$EJABBERD_CONFIG_PATH" != "${EJABBERD_CONFIG_PATH/.yml/}" ] ; then
+if [ "$EJABBERD_CONFIG_PATH" != "${EJABBERD_CONFIG_PATH%.yml}" ] ; then
     rate=$(grep log_rate_limit $EJABBERD_CONFIG_PATH | cut -d':' -f2 | sed 's/ *//')
     rotate=$(grep log_rotate_size $EJABBERD_CONFIG_PATH | cut -d':' -f2 | sed 's/ *//')
     count=$(grep log_rotate_count $EJABBERD_CONFIG_PATH | cut -d':' -f2 | sed 's/ *//')