From 234ebffec8d05a030abca3b199a1f1da5a959a99 Mon Sep 17 00:00:00 2001 From: Alfonso Date: Mon, 27 Apr 2020 10:03:13 +0200 Subject: [PATCH] Update blocklist-update.sh unary operator expected error in line 28 --- blocklist-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocklist-update.sh b/blocklist-update.sh index 934aa2b..bf8d41e 100644 --- a/blocklist-update.sh +++ b/blocklist-update.sh @@ -25,7 +25,7 @@ MAILLOG="/var/log/blocklist-update.log" MAIL_SENDER=$(whoami) #this defines a system-user without a shell or password. It's used as the e-mail sender name. You can create one like this: useradd -M -N -s /usr/sbin/nologin myuser && passwd -d myuser MAIL_SUBJECT="ERROR - IP blocklist script failed to download the IP set" read -t 15 -p "Insert a mail to send the log. Separate with space to send to multiple recipients: " MAIL_RECIPIENTS -if [ ! $MAIL_RECIPIENTS ]; then MAIL_RECIPIENTS="$(whoami)@$(HOSTNAME)"; else echo "Address: " $MAIL_RECIPIENTS; fi; +if [ ! "$MAIL_RECIPIENTS" ]; then MAIL_RECIPIENTS="$(whoami)@$(HOSTNAME)"; else echo "Address: " $MAIL_RECIPIENTS; fi; BLOCKLIST_FILE="/tmp/ip-blocklist.txt" BLOCKLIST_TMP_FILE="/tmp/ip-blocklist.txt.tmp"