shfmt tunsocks.sh
This commit is contained in:
parent
2b1095760f
commit
ba4bbfa18c
@ -15,8 +15,7 @@ else
|
||||
proxy="socks5:///run/nnss-${nsname}/sock"
|
||||
fi
|
||||
|
||||
setup()
|
||||
{
|
||||
setup() {
|
||||
ip tuntap add mode tun dev "$device"
|
||||
|
||||
/usr/bin/tun2socks -device "$device" -proxy "$proxy" &
|
||||
@ -34,8 +33,7 @@ setup()
|
||||
wait
|
||||
}
|
||||
|
||||
cleanup()
|
||||
{
|
||||
cleanup() {
|
||||
ip tuntap del mode tun dev "$device" || true
|
||||
kill "$(cat "$pidfile")"
|
||||
ip -n "$ns" tuntap del mode tun dev "$device"
|
||||
|
Loading…
x
Reference in New Issue
Block a user