parent
deeaa9b6c3
commit
886012699a
2 changed files with 13 additions and 1 deletions
|
@ -174,7 +174,7 @@ closeNetwork () {
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
{ pkill -f dnsmasq || true; } 2>/dev/null
|
fKill "dnsmasq"
|
||||||
|
|
||||||
ip link set "$VM_NET_TAP" down promisc off || true
|
ip link set "$VM_NET_TAP" down promisc off || true
|
||||||
ip link delete "$VM_NET_TAP" || true
|
ip link delete "$VM_NET_TAP" || true
|
||||||
|
|
12
src/reset.sh
12
src/reset.sh
|
@ -34,6 +34,18 @@ STORAGE="/storage"
|
||||||
|
|
||||||
# Helper functions
|
# Helper functions
|
||||||
|
|
||||||
|
fKill () {
|
||||||
|
local name=$1
|
||||||
|
|
||||||
|
{ pkill -f "$name" || true; } 2>/dev/null
|
||||||
|
|
||||||
|
while pgrep -f -l "$name" >/dev/null; do
|
||||||
|
sleep 0.1
|
||||||
|
done
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
addPackage () {
|
addPackage () {
|
||||||
|
|
||||||
local pkg=$1
|
local pkg=$1
|
||||||
|
|
Loading…
Reference in a new issue