banlist: fail on unexpected errors
Also, don't output the 'already banned' error message
This commit is contained in:
parent
e0276503ed
commit
c36c496507
|
@ -279,9 +279,13 @@ in {
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
echo "Importing node banlist..."
|
echo "Importing node banlist..."
|
||||||
set +e
|
cat ${./banlist.cli.txt} | while read line; do
|
||||||
. ${./banlist.cli.txt}
|
if ! err=$(eval "$line" 2>&1) && [[ $err != *already\ banned* ]]; then
|
||||||
true
|
# unexpected error
|
||||||
|
echo "$err"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "${cfg.user}";
|
User = "${cfg.user}";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user