From edb3fb188008a807c5cdf4a742e8f7e940577695 Mon Sep 17 00:00:00 2001 From: Casper Date: Sat, 22 Oct 2022 03:43:17 +0200 Subject: [PATCH] setup: fix unbound variable error (#2849) --- CHANGELOG.md | 1 + target/bin/setup | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53d76d40..c6143e09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file. The format ### Fixed +- **scripts**: Fix unbound variable error ([#2849](https://github.com/docker-mailserver/docker-mailserver/pull/2849)) - **scripts**: Run `user-patches.sh` right before starting daemons ([#2817](https://github.com/docker-mailserver/docker-mailserver/pull/2817)) - **scripts**: Run Amavis cron job only when Amavis is enabled ([#2831](https://github.com/docker-mailserver/docker-mailserver/pull/2831)) diff --git a/target/bin/setup b/target/bin/setup index 8d2093fb..69232438 100755 --- a/target/bin/setup +++ b/target/bin/setup @@ -110,7 +110,7 @@ function _main ( del ) shift 2 ; delmailuser "${@}" ;; ( restrict ) shift 2 ; restrict-access "${@}" ;; ( list ) listmailuser ;; - ( * ) _invalid_command "${1}" "${2}" ;; + ( * ) _invalid_command "${1}" "${2:-}" ;; esac ;; @@ -119,7 +119,7 @@ function _main ( add ) shift 2 ; addalias "${1}" "${2}" ;; ( del ) shift 2 ; delalias "${1}" "${2}" ;; ( list ) shift 2 ; listalias ;; - ( * ) _invalid_command "${1}" "${2}" ;; + ( * ) _invalid_command "${1}" "${2:-}" ;; esac ;; @@ -127,7 +127,7 @@ function _main case ${2:-} in ( set ) shift 2 ; setquota "${@}" ;; ( del ) shift 2 ; delquota "${@}" ;; - ( * ) _invalid_command "${1}" "${2}" ;; + ( * ) _invalid_command "${1}" "${2:-}" ;; esac ;; @@ -137,14 +137,14 @@ function _main ( update ) shift 2 ; updatedovecotmasteruser "${@}" ;; ( del ) shift 2 ; deldovecotmasteruser "${@}" ;; ( list ) listdovecotmasteruser ;; - ( * ) _invalid_command "${1}" "${2}" ;; + ( * ) _invalid_command "${1}" "${2:-}" ;; esac ;; ( config ) case ${2:-} in ( dkim ) shift 2 ; open-dkim "${@}" ;; - ( * ) _invalid_command "${1}" "${2}" ;; + ( * ) _invalid_command "${1}" "${2:-}" ;; esac ;; @@ -153,7 +153,7 @@ function _main ( add-domain ) shift 2 ; addrelayhost "${@}" ;; ( add-auth ) shift 2 ; addsaslpassword "${@}" ;; ( exclude-domain ) shift 2 ; excluderelaydomain "${@}" ;; - ( * ) _invalid_command "${1}" "${2}" ;; + ( * ) _invalid_command "${1}" "${2:-}" ;; esac ;;