Delete tun device if exists when create_tun_device is set (#2328)

This commit is contained in:
Dustin Wilson 2022-08-28 19:11:41 -05:00 committed by GitHub
parent ab202865af
commit 2c1f6102ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,7 @@ fi
# If create_tun_device is set, create /dev/net/tun
if [[ "${CREATE_TUN_DEVICE,,}" == "true" ]] ; then
echo "Creating TUN device /dev/net/tun"
rm -f /dev/net/tun
mkdir -p /dev/net
mknod /dev/net/tun c 10 200
chmod 0666 /dev/net/tun