Fix blacklist add script (works only on latest yacy docker)
This commit is contained in:
parent
b38973f949
commit
5d0cc7ed1d
|
@ -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 ]'
|
||||||
|
|
Loading…
Reference in New Issue