From daa02a4f1c48eae1aee28b35df843aa33b7bd406 Mon Sep 17 00:00:00 2001 From: Stephan Geisler Date: Thu, 19 Sep 2019 15:22:55 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9Eupdate=5Fblocklist.sh=E2=80=9C=20?= =?UTF-8?q?=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update_blocklist.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/update_blocklist.sh b/update_blocklist.sh index 5fb8421..17bbb01 100644 --- a/update_blocklist.sh +++ b/update_blocklist.sh @@ -25,6 +25,11 @@ LOGLEVEL=1 ############################################################################################################### # CREATE TABLE AutoBlockIP(IP varchar(50) PRIMARY KEY,RecordTime date NOT NULL,ExpireTime date NOT NULL,Deny boolean NOT NULL,IPStd varchr(50) NOT NULL,Type INTEGER,Meta varchar(256)) +if [ $(whoami) != "root" ]; then + echo "WARNING: this script must run from root!" >&2 + exit 1 +fi + countadded=0 countskipped=0 UNIXTIME=$(date +%s)