fix: Close file descriptors

* fix: Close file descriptors
This commit is contained in:
Kroese
2023-12-25 04:04:01 +01:00
committed by GitHub
parent 4bdcf8bfe1
commit 281f2992ff

View File

@@ -154,6 +154,9 @@ configureNAT () {
closeNetwork () { closeNetwork () {
exec 30<&- || true
exec 40<&- || true
if [[ "$DHCP" == [Yy1]* ]]; then if [[ "$DHCP" == [Yy1]* ]]; then
{ pkill -f server.sh || true; } 2>/dev/null { pkill -f server.sh || true; } 2>/dev/null
@@ -189,7 +192,7 @@ if [ ! -c /dev/net/tun ]; then
fi fi
if [ ! -c /dev/net/tun ]; then if [ ! -c /dev/net/tun ]; then
error "Please add the following docker settings to your container: --device=/dev/net/tun" && exit 25 error "Please add the following docker setting to your container: --device=/dev/net/tun" && exit 25
fi fi
# Create the necessary file structure for /dev/vhost-net # Create the necessary file structure for /dev/vhost-net