群辉容器报tun错误

在群辉运行lanthora/candy容器时报stdout /dev/tun错误,是因为群辉系统默认没有启用该模块导致的。

vim /usr/local/etc/rc.d/tun.sh
输入内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# Create the necessary file structure for /dev/net/tun
if ( [ ! -c /dev/net/tun ] ); then
if ( [ ! -d /dev/net ] ); then
mkdir -m 755 /dev/net
fi
mknod /dev/net/tun c 10 200
chmod 0755 /dev/net/tun
fi

# Load the tun module if not already loaded
if ( !(lsmod | grep -q "^tun\s") ); then
insmod /lib/modules/tun.ko
fi

给权限:
chmod 0755 tun.sh
运行一次
sudo /usr/local/etc/rc.d/tun.sh


群辉容器报tun错误
https://hexo.psorai.eu.org/2024/11/01/群辉容器报tun错误/
Author
Sora
Posted on
November 1, 2024
Licensed under