From 4f660966d036a562d1fbbadbe0d56b52fa6cbf5b Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Sun, 20 Jun 2021 11:19:19 -0700 Subject: [PATCH] Shellchecker Signed-off-by: Dan Schaper --- automated install/basic-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 73b456ca..96ca8c92 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1954,7 +1954,7 @@ installLogrotate() { return 2 fi # Copy the file over from the local repo - install -D -m 644 -T ${PI_HOLE_LOCAL_REPO}/advanced/Templates/logrotate ${target} + install -D -m 644 -T "${PI_HOLE_LOCAL_REPO}"/advanced/Templates/logrotate ${target} # Different operating systems have different user / group # settings for logrotate that makes it impossible to create # a static logrotate file that will work with e.g. @@ -1963,7 +1963,7 @@ installLogrotate() { # the local properties of the /var/log directory logusergroup="$(stat -c '%U %G' /var/log)" # If there is a usergroup for log rotation, - if [[ ! -z "${logusergroup}" ]]; then + if [[ -n "${logusergroup}" ]]; then # replace the line in the logrotate script with that usergroup. sed -i "s/# su #/su ${logusergroup}/g;" ${target} fi