From 9425ca5b0d711887fa8da5d74dc01011174b360a Mon Sep 17 00:00:00 2001 From: nervuri Date: Thu, 16 Sep 2021 17:46:43 +0000 Subject: [PATCH] check for missing .onion capsules --- get-hosts.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/get-hosts.sh b/get-hosts.sh index bb58ee0..deef9ff 100755 --- a/get-hosts.sh +++ b/get-hosts.sh @@ -60,6 +60,11 @@ hosts=$(echo "$hosts" | grep '\.\|:') # Remove explicitly excluded hosts. hosts=$(echo "$hosts" | grep -vxEf excluded-hosts) +if ! echo "$hosts" | grep -qE '\.onion(:.*)?$'; then + >&2 echo "The .onions are missing!" + exit 1 +fi + if [ -z "$hosts" ]; then >&2 echo "hosts file downloads failed." exit 1