Fix blacklist add script (works only on latest yacy docker)

This commit is contained in:
Bofh 2021-01-04 16:04:37 +01:00
parent b38973f949
commit 5d0cc7ed1d
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/bin/bash
add_entry () add_entry ()
{ {
@ -24,14 +24,14 @@ add_entry_domainandsub ()
add_entry '*.'$1'/.*' add_entry '*.'$1'/.*'
} }
if [ "$1" == '' ]; then if [[ $1 == '' ]]; then
echo 'E| you must specify the domain to add' echo 'E| you must specify the domain to add'
exit 1 exit 1
fi fi
if [ "$2" == 0 ]; then if [[ $2 == 0 ]]; then
add_entry_domainonly $1 add_entry_domainonly $1
elif [ "$2" == 1 ]; then elif [[ $2 == 1 ]]; then
add_entry_domainandsub $1 add_entry_domainandsub $1
else else
echo 'E| second parameter must be one of [ 0 | 1 ]' echo 'E| second parameter must be one of [ 0 | 1 ]'