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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,6 +154,9 @@ configureNAT () {
closeNetwork () {
exec 30<&- || true
exec 40<&- || true
if [[ "$DHCP" == [Yy1]* ]]; then
{ pkill -f server.sh || true; } 2>/dev/null
@ -189,7 +192,7 @@ if [ ! -c /dev/net/tun ]; then
fi
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
# Create the necessary file structure for /dev/vhost-net