nuno revisou este gist 1 month ago. Ir para a revisão
1 file changed, 11 insertions
gistfile1.txt(arquivo criado)
| @@ -0,0 +1,11 @@ | |||
| 1 | + | while IFS= read -r name; do | |
| 2 | + | [[ -f "$(ctx::block::path "${name}.block")" ]] \ | |
| 3 | + | && p_restricted["$name"]=true || p_restricted["$name"]=false | |
| 4 | + | local pubkey | |
| 5 | + | pubkey=$(keys::public "$name" 2>/dev/null || echo "") | |
| 6 | + | if [[ -n "$pubkey" ]] && ! echo "$wg_peers" | grep -qF "$pubkey"; then | |
| 7 | + | p_blocked["$name"]=true | |
| 8 | + | else | |
| 9 | + | p_blocked["$name"]=false | |
| 10 | + | fi | |
| 11 | + | done < <(peers::all) | |
Próximo
Anterior