Remove unnecessary quotes from command substitutions (#2561)

This commit is contained in:
Casper 2022-05-05 10:28:38 +02:00 committed by GitHub
parent b4c49d272f
commit 628e902233
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 102 additions and 102 deletions

View file

@ -94,7 +94,7 @@ function _check_for_changes
# Prevent an unnecessary change detection from the newly extracted cert files by updating their hashes in advance:
local CERT_DOMAIN
CERT_DOMAIN="$(_find_letsencrypt_domain)"
CERT_DOMAIN=$(_find_letsencrypt_domain)
ACME_CERT_DIR="/etc/letsencrypt/live/${CERT_DOMAIN}"
sed -i "\|${ACME_CERT_DIR}|d" "${CHKSUM_FILE}.new"

View file

@ -52,7 +52,7 @@ function _obtain_hostname_and_domainname
# going forward. In future our docs should drop any mention of it.
#shellcheck disable=SC2034
DOMAINNAME="$(hostname -d)"
DOMAINNAME=$(hostname -d)
fi
fi

View file

@ -2,10 +2,10 @@
# This becomes the sourcing script name
# (example: check-for-changes.sh)
SCRIPT_NAME="$(basename "$0")"
SCRIPT_NAME=$(basename "$0")
# Used inside of lock files to identify them and
# prevent removal by other instances of docker-mailserver
LOCK_ID="$(uuid)"
LOCK_ID=$(uuid)
function _create_lock
{

View file

@ -187,8 +187,8 @@ function _setup_ssl
# checks folders in /etc/letsencrypt/live to identify which one to implicitly use:
local LETSENCRYPT_DOMAIN LETSENCRYPT_KEY
LETSENCRYPT_DOMAIN="$(_find_letsencrypt_domain)"
LETSENCRYPT_KEY="$(_find_letsencrypt_key "${LETSENCRYPT_DOMAIN}")"
LETSENCRYPT_DOMAIN=$(_find_letsencrypt_domain)
LETSENCRYPT_KEY=$(_find_letsencrypt_key "${LETSENCRYPT_DOMAIN}")
# Update relevant config for Postfix and Dovecot
_log 'trace' "Adding ${LETSENCRYPT_DOMAIN} SSL certificate to the postfix and dovecot configuration"

View file

@ -15,7 +15,7 @@ function _default_start_daemon
_log 'debug' "Starting ${1:?}"
local RESULT
RESULT="$(supervisorctl start "${1}" 2>&1)"
RESULT=$(supervisorctl start "${1}" 2>&1)
# shellcheck disable=SC2181
if [[ ${?} -ne 0 ]]

View file

@ -714,7 +714,7 @@ function _setup_docker_permit
CONTAINER_IP=$(ip addr show "${NETWORK_INTERFACE}" | \
grep 'inet ' | sed 's|[^0-9\.\/]*||g' | cut -d '/' -f 1)
CONTAINER_NETWORK="$(echo "${CONTAINER_IP}" | cut -d '.' -f1-2).0.0"
CONTAINER_NETWORK=$(echo "${CONTAINER_IP}" | cut -d '.' -f1-2).0.0
if [[ -z ${CONTAINER_IP} ]]
then
@ -955,7 +955,7 @@ function _setup_security_stack
cat >"${SPAMASSASSIN_KAM_CRON_FILE}" <<"EOM"
#! /bin/bash
RESULT="$(sa-update --gpgkey 24C063D8 --channel kam.sa-channels.mcgrail.com 2>&1)"
RESULT=$(sa-update --gpgkey 24C063D8 --channel kam.sa-channels.mcgrail.com 2>&1)
EXIT_CODE=${?}
# see https://spamassassin.apache.org/full/3.1.x/doc/sa-update.html#exit_codes