25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Merge pull request #2399 from 4z3/ejabberdctl-fix-parser

ejabberdctl: fix parameters parsing
This commit is contained in:
Christophe Romain 2018-04-25 10:39:19 +02:00 committed by GitHub
commit 316a19d600
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,19 +41,17 @@ case $(id -un) in
esac esac
# parse command line parameters # parse command line parameters
for arg; do while [ $# -gt 0 ]; do
case $arg in case $1 in
-n|--node) ERLANG_NODE_ARG=$2; shift;; -n|--node) ERLANG_NODE_ARG=$2; shift 2;;
-s|--spool) SPOOL_DIR=$2; shift;; -s|--spool) SPOOL_DIR=$2; shift 2;;
-l|--logs) LOGS_DIR=$2; shift;; -l|--logs) LOGS_DIR=$2; shift 2;;
-f|--config) EJABBERD_CONFIG_PATH=$2; shift;; -f|--config) EJABBERD_CONFIG_PATH=$2; shift 2;;
-c|--ctl-config) EJABBERDCTL_CONFIG_PATH=$2; shift;; -c|--ctl-config) EJABBERDCTL_CONFIG_PATH=$2; shift 2;;
-d|--config-dir) ETC_DIR=$2; shift;; -d|--config-dir) ETC_DIR=$2; shift 2;;
-t|--no-timeout) NO_TIMEOUT="--no-timeout";; -t|--no-timeout) NO_TIMEOUT="--no-timeout"; shift;;
--) :;;
*) break;; *) break;;
esac esac
shift
done done
# define ejabberd variables if not already defined from the command line # define ejabberd variables if not already defined from the command line