ssh-fwd : changement de la pipeline pour checker l'existence de la
redirection
This commit is contained in:
parent
fcdfc805a2
commit
f1395291d7
1 changed files with 1 additions and 2 deletions
|
@ -47,8 +47,7 @@ stop_forwarding() {
|
||||||
is_forwarding_active() {
|
is_forwarding_active() {
|
||||||
lsof -i -P -n \
|
lsof -i -P -n \
|
||||||
| awk '($1 == "ssh" && $10 == "(LISTEN)") { print $9 }' \
|
| awk '($1 == "ssh" && $10 == "(LISTEN)") { print $9 }' \
|
||||||
| cut -d : -f 2 \
|
| sed 's/.*://' | sort | uniq | grep -q "$local_port"
|
||||||
| grep -q "$local_port"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Branchement principal
|
# Branchement principal
|
||||||
|
|
Loading…
Reference in a new issue