{
"settings": {
"analysis": {
"analyzer": {
"address_analyzer_toster": {
"tokenizer": "whitespace",
"char_filter": [
"useless_symbols",
],
"filter": "useless_words": {
"type": "stop",
"stopwords": ["ул", "д", "проезд", ...]
}
}
},
"char_filter": {
"useless_symbols": {
"type": "pattern_replace",
"pattern": "[,\.:].*",
"replacement": ""
}
}
}
}
}
--security-level 2 --up /path/to/route-killswitch.sh
KERNEL=="vpn0", RUN+="/PATH_TO_THE_SCRIPT/SCRIPT_NAME"
#!/bin/sh
ip route del default dev dev_name
upstream intraserver {
server internal-ip:port max_fails=2 fail_timeout=10;
server 127.0.0.2:8880 backup;
}
server {
listen 127.0.0.2:8880;
return 502;
}
server {
...
proxy_pass http://intraserver;
...
}