From 5531423ba09140fab3e019f62c5c1990e2d98d65 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Fri, 15 Oct 2021 16:04:29 -0700 Subject: [PATCH] mbox getopt, fixed tab opt --- bin/vmail-mboxes-get.sh | 4 ++++ bin/vmail.sh | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/vmail-mboxes-get.sh b/bin/vmail-mboxes-get.sh index 9fc43ba..6d89b55 100755 --- a/bin/vmail-mboxes-get.sh +++ b/bin/vmail-mboxes-get.sh @@ -39,6 +39,10 @@ vmail:getoptions "$@" dbcmd="mysql --defaults-extra-file=$MYSQL_CONNECTION_INFO_FILE" dbcmdopts="-e" +if [[ -n $tab ]]; then + dbcmdopts="-s -N $dbcmdopts" +fi + # build query dbquery="SELECT vm_mboxes.mbox, vm_domains.domain" if [ -n "$includepassword" ]; then diff --git a/bin/vmail.sh b/bin/vmail.sh index ce3e992..b2b3a7a 100755 --- a/bin/vmail.sh +++ b/bin/vmail.sh @@ -75,7 +75,7 @@ function vmail::yesno() { function vmail:getoptions () { local OPTIND - while getopts "ha:b:d:e:f:gcp:q:s:tkf:gl:vx" opt ; do + while getopts "ha:b:d:e:f:gcp:q:s:tkf:gl:m:vx" opt ; do case "${opt}" in h ) # display help and exit help @@ -158,6 +158,9 @@ function vmail:getoptions () { l ) # limit limit=${OPTARG} ;; + m ) # mbox + mbox=${OPTARG} + ;; p ) # password password=${OPTARG} ;;