From 5d0cc7ed1db686087070e15d23f439fab3c586ac Mon Sep 17 00:00:00 2001 From: Bastard Operator Date: Mon, 4 Jan 2021 16:04:37 +0100 Subject: [PATCH] Fix blacklist add script (works only on latest yacy docker) --- blacklist-add.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blacklist-add.sh b/blacklist-add.sh index 4b1a36b..27868ce 100755 --- a/blacklist-add.sh +++ b/blacklist-add.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash add_entry () { @@ -24,14 +24,14 @@ add_entry_domainandsub () add_entry '*.'$1'/.*' } -if [ "$1" == '' ]; then +if [[ $1 == '' ]]; then echo 'E| you must specify the domain to add' exit 1 fi -if [ "$2" == 0 ]; then +if [[ $2 == 0 ]]; then add_entry_domainonly $1 -elif [ "$2" == 1 ]; then +elif [[ $2 == 1 ]]; then add_entry_domainandsub $1 else echo 'E| second parameter must be one of [ 0 | 1 ]'