From 182b71d33f861773dc7837f4391e9647eb975f00 Mon Sep 17 00:00:00 2001 From: Brennan Kinney <5098581+polarathene@users.noreply.github.com> Date: Wed, 20 Apr 2022 12:29:28 +1200 Subject: [PATCH] chore: Drop `setup.sh` DATABASE fallback ENV (#2556) * chore: Remove `DATABASE` fallback ENV This was introduced without any mention or need, thus removing until a real use-case requires it. * chore: Remove `USER_DATABASE` fallback ENV Likewise, nothing requires this to be customizable. * chore: Consistently use single quote strings --- target/bin/addalias | 2 +- target/bin/addmailuser | 2 +- target/bin/addrelayhost | 2 +- target/bin/addsaslpassword | 2 +- target/bin/delalias | 2 +- target/bin/delmailuser | 8 ++++---- target/bin/delquota | 4 ++-- target/bin/excluderelaydomain | 2 +- target/bin/listalias | 2 +- target/bin/setquota | 4 ++-- target/bin/updatemailuser | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/target/bin/addalias b/target/bin/addalias index b8d2d61c..cc49a42f 100755 --- a/target/bin/addalias +++ b/target/bin/addalias @@ -3,7 +3,7 @@ # shellcheck source=../scripts/helpers/index.sh source /usr/local/bin/helpers/index.sh -DATABASE=${DATABASE:-/tmp/docker-mailserver/postfix-virtual.cf} +DATABASE='/tmp/docker-mailserver/postfix-virtual.cf' function __usage { diff --git a/target/bin/addmailuser b/target/bin/addmailuser index e06c04b9..4882dbc8 100755 --- a/target/bin/addmailuser +++ b/target/bin/addmailuser @@ -5,7 +5,7 @@ # shellcheck source=../scripts/helpers/index.sh source /usr/local/bin/helpers/index.sh -DATABASE=${DATABASE:-/tmp/docker-mailserver/postfix-accounts.cf} +DATABASE='/tmp/docker-mailserver/postfix-accounts.cf' function __usage { diff --git a/target/bin/addrelayhost b/target/bin/addrelayhost index 8ed8eb03..a81bcee2 100755 --- a/target/bin/addrelayhost +++ b/target/bin/addrelayhost @@ -3,7 +3,7 @@ # shellcheck source=../scripts/helpers/index.sh source /usr/local/bin/helpers/index.sh -DATABASE=${DATABASE:-/tmp/docker-mailserver/postfix-relaymap.cf} +DATABASE='/tmp/docker-mailserver/postfix-relaymap.cf' function __usage { diff --git a/target/bin/addsaslpassword b/target/bin/addsaslpassword index 76d29b95..8428213d 100755 --- a/target/bin/addsaslpassword +++ b/target/bin/addsaslpassword @@ -3,7 +3,7 @@ # shellcheck source=../scripts/helpers/index.sh source /usr/local/bin/helpers/index.sh -DATABASE=${DATABASE:-/tmp/docker-mailserver/postfix-sasl-password.cf} +DATABASE='/tmp/docker-mailserver/postfix-sasl-password.cf' function __usage { echo "Usage: addsaslpassword " ; } diff --git a/target/bin/delalias b/target/bin/delalias index c427ed95..a07af1d2 100755 --- a/target/bin/delalias +++ b/target/bin/delalias @@ -3,7 +3,7 @@ # shellcheck source=../scripts/helpers/index.sh source /usr/local/bin/helpers/index.sh -DATABASE=${DATABASE:-/tmp/docker-mailserver/postfix-virtual.cf} +DATABASE='/tmp/docker-mailserver/postfix-virtual.cf' EMAIL="${1}" RECIPIENT="${2}" diff --git a/target/bin/delmailuser b/target/bin/delmailuser index 9f78b158..0ee83a30 100755 --- a/target/bin/delmailuser +++ b/target/bin/delmailuser @@ -8,10 +8,10 @@ # shellcheck source=../scripts/helpers/index.sh source /usr/local/bin/helpers/index.sh -DATABASE=${DATABASE:-/tmp/docker-mailserver/postfix-accounts.cf} -ALIAS_DATABASE="/tmp/docker-mailserver/postfix-virtual.cf" -QUOTA_DATABASE="/tmp/docker-mailserver/dovecot-quotas.cf" -MAILDEL=false +DATABASE='/tmp/docker-mailserver/postfix-accounts.cf' +ALIAS_DATABASE='/tmp/docker-mailserver/postfix-virtual.cf' +QUOTA_DATABASE='/tmp/docker-mailserver/dovecot-quotas.cf' +MAILDEL='false' function __usage { diff --git a/target/bin/delquota b/target/bin/delquota index b553acbe..1cd555db 100755 --- a/target/bin/delquota +++ b/target/bin/delquota @@ -3,8 +3,8 @@ # shellcheck source=../scripts/helpers/index.sh source /usr/local/bin/helpers/index.sh -DATABASE=${DATABASE:-/tmp/docker-mailserver/dovecot-quotas.cf} -USER_DATABASE=${USER_DATABASE:-/tmp/docker-mailserver/postfix-accounts.cf} +DATABASE='/tmp/docker-mailserver/dovecot-quotas.cf' +USER_DATABASE='/tmp/docker-mailserver/postfix-accounts.cf' function __usage { echo 'Usage: delquota ' ; } diff --git a/target/bin/excluderelaydomain b/target/bin/excluderelaydomain index 50d93c06..bb5b6096 100755 --- a/target/bin/excluderelaydomain +++ b/target/bin/excluderelaydomain @@ -3,7 +3,7 @@ # shellcheck source=../scripts/helpers/index.sh source /usr/local/bin/helpers/index.sh -DATABASE=${DATABASE:-/tmp/docker-mailserver/postfix-relaymap.cf} +DATABASE='/tmp/docker-mailserver/postfix-relaymap.cf' DOMAIN="${1}" diff --git a/target/bin/listalias b/target/bin/listalias index fcdf1e5d..53b19261 100755 --- a/target/bin/listalias +++ b/target/bin/listalias @@ -3,7 +3,7 @@ # shellcheck source=../scripts/helpers/index.sh source /usr/local/bin/helpers/index.sh -DATABASE=${DATABASE:-/tmp/docker-mailserver/postfix-virtual.cf} +DATABASE='/tmp/docker-mailserver/postfix-virtual.cf' [[ -f ${DATABASE} ]] || _exit_with_error "No 'postfix-virtual.cf' file" [[ -s ${DATABASE} ]] || _exit_with_error "Empty 'postfix-virtual.cf' - no aliases have been added" diff --git a/target/bin/setquota b/target/bin/setquota index 334216aa..beee5bbf 100755 --- a/target/bin/setquota +++ b/target/bin/setquota @@ -8,8 +8,8 @@ # shellcheck source=../scripts/helpers/index.sh source /usr/local/bin/helpers/index.sh -DATABASE=${DATABASE:-/tmp/docker-mailserver/dovecot-quotas.cf} -USER_DATABASE=${USER_DATABASE:-/tmp/docker-mailserver/postfix-accounts.cf} +DATABASE='/tmp/docker-mailserver/dovecot-quotas.cf' +USER_DATABASE='/tmp/docker-mailserver/postfix-accounts.cf' USER="${1}" shift diff --git a/target/bin/updatemailuser b/target/bin/updatemailuser index 81374748..f07d6f1e 100755 --- a/target/bin/updatemailuser +++ b/target/bin/updatemailuser @@ -8,7 +8,7 @@ # shellcheck source=../scripts/helpers/index.sh source /usr/local/bin/helpers/index.sh -DATABASE=${DATABASE:-/tmp/docker-mailserver/postfix-accounts.cf} +DATABASE='/tmp/docker-mailserver/postfix-accounts.cf' USER="${1}" shift