From bdf4155bedccb36117a41bd7d0952c1559e4da67 Mon Sep 17 00:00:00 2001 From: Teal Dulcet Date: Thu, 21 Dec 2023 08:00:26 -0800 Subject: [PATCH] Fixed SC2046: Quote to prevent word splitting. --- management/daily_tasks.sh | 2 +- setup/bootstrap.sh | 2 +- setup/firstuser.sh | 2 +- setup/mail-dovecot.sh | 4 ++-- setup/nextcloud.sh | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/management/daily_tasks.sh b/management/daily_tasks.sh index 0f7bcdc8..24a97245 100755 --- a/management/daily_tasks.sh +++ b/management/daily_tasks.sh @@ -11,7 +11,7 @@ export LC_TYPE=en_US.UTF-8 # On Mondays, i.e. once a week, send the administrator a report of total emails # sent and received so the admin might notice server abuse. -if [ $(date "+%u") -eq 1 ]; then +if [ "$(date "+%u")" -eq 1 ]; then management/mail_log.py -t week | management/email_administrator.py "Mail-in-a-Box Usage Report" fi diff --git a/setup/bootstrap.sh b/setup/bootstrap.sh index ace51879..b8b365c4 100644 --- a/setup/bootstrap.sh +++ b/setup/bootstrap.sh @@ -77,7 +77,7 @@ fi cd "$HOME/mailinabox" || exit # Update it. -if [ "$TAG" != $(git describe --always) ]; then +if [ "$TAG" != "$(git describe --always)" ]; then echo "Updating Mail-in-a-Box to $TAG . . ." git fetch --depth 1 --force --prune origin tag "$TAG" if ! git checkout -q "$TAG"; then diff --git a/setup/firstuser.sh b/setup/firstuser.sh index 8d254b53..76514222 100644 --- a/setup/firstuser.sh +++ b/setup/firstuser.sh @@ -11,7 +11,7 @@ if [ -z "$(management/cli.py user)" ]; then input_box "Mail Account" \ "Let's create your first mail account. \n\nWhat email address do you want?" \ - me@$(get_default_hostname) \ + "me@$(get_default_hostname)" \ EMAIL_ADDR if [ -z "$EMAIL_ADDR" ]; then diff --git a/setup/mail-dovecot.sh b/setup/mail-dovecot.sh index 39b22515..734e7ed3 100755 --- a/setup/mail-dovecot.sh +++ b/setup/mail-dovecot.sh @@ -45,8 +45,8 @@ apt_install \ # - https://www.dovecot.org/list/dovecot/2012-August/137569.html # - https://www.dovecot.org/list/dovecot/2011-December/132455.html tools/editconf.py /etc/dovecot/conf.d/10-master.conf \ - default_process_limit=$(echo "$(nproc) * 250" | bc) \ - default_vsz_limit=$(echo "$(free -tm | tail -1 | awk '{print $2}') / 3" | bc)M \ + default_process_limit="$(echo "$(nproc) * 250" | bc)" \ + default_vsz_limit="$(echo "$(free -tm | tail -1 | awk '{print $2}') / 3" | bc)M" \ log_path=/var/log/mail.log # The inotify `max_user_instances` default is 128, which constrains diff --git a/setup/nextcloud.sh b/setup/nextcloud.sh index bba0ab65..b6183789 100755 --- a/setup/nextcloud.sh +++ b/setup/nextcloud.sh @@ -126,7 +126,7 @@ InstallNextcloud() { # Create a symlink to the config.php in STORAGE_ROOT (for upgrades we're restoring the symlink we previously # put in, and in new installs we're creating a symlink and will create the actual config later). - ln -sf "$STORAGE_ROOT/owncloud/config.php /usr/local/lib/owncloud/config/config.php" + ln -sf "$STORAGE_ROOT/owncloud/config.php" /usr/local/lib/owncloud/config/config.php # Make sure permissions are correct or the upgrade step won't run. # $STORAGE_ROOT/owncloud may not yet exist, so use -f to suppress