]> granicus.if.org Git - ejabberd/commitdiff
Remove use of getopt to support simpler shells
authorChristophe Romain <christophe.romain@process-one.net>
Thu, 1 Jun 2017 10:10:06 +0000 (12:10 +0200)
committerChristophe Romain <christophe.romain@process-one.net>
Thu, 1 Jun 2017 10:10:06 +0000 (12:10 +0200)
ejabberdctl.template

index 5454757d3e4dc1b2dc14b28286c961dd88eb7c08..3fb30218701a976a28a5f3d02776f86d2842cdba 100755 (executable)
@@ -32,8 +32,6 @@ if [ "$EXEC_CMD" = "false" ] ; then
 fi
 
 # parse command line parameters
-ARGS=`getopt -o n:s:l:f:c:d:t --long node:,spool:,logs:,config:,ctl-config:,config-dir:,no-timeout -n ejabberdctl -- "$@"`
-eval set -- "$ARGS";
 for arg; do
     case $1 in
         -n|--node) ERLANG_NODE_ARG=$2; shift;;
@@ -43,7 +41,8 @@ for arg; do
         -c|--ctl-config) EJABBERDCTL_CONFIG_PATH=$2; shift;;
         -d|--config-dir) ETC_DIR=$2; shift;;
         -t|--no-timeout) NO_TIMEOUT="--no-timeout";;
-        --) shift; break;;
+        --) :;;
+        *) break;;
     esac
     shift
 done