mirror of
https://github.com/TheyCallMeSecond/sing-box-manager.git
synced 2024-11-16 03:32:31 +08:00
Update 0.sh
This commit is contained in:
parent
67389d81af
commit
08bfefa999
34
0.sh
34
0.sh
|
@ -24,23 +24,29 @@ install_dependencies() {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v $dependencies &> /dev/null; then
|
||||
echo "下载并安装依赖..."
|
||||
if command -v apt-get &> /dev/null; then
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y $dependencies
|
||||
elif command -v dnf &> /dev/null; then
|
||||
sudo dnf install -y $dependencies
|
||||
elif command -v yum &> /dev/null; then
|
||||
sudo yum install -y $dependencies
|
||||
fi
|
||||
|
||||
echo "依赖已安装。"
|
||||
else
|
||||
echo "依赖已经安装,跳过安装步骤。"
|
||||
echo "更新软件包列表..."
|
||||
if command -v apt-get &> /dev/null; then
|
||||
apt-get update
|
||||
elif command -v dnf &> /dev/null; then
|
||||
dnf makecache
|
||||
elif command -v yum &> /dev/null; then
|
||||
yum makecache
|
||||
fi
|
||||
|
||||
echo "下载并安装依赖..."
|
||||
if command -v apt-get &> /dev/null; then
|
||||
apt-get install -y $dependencies
|
||||
elif command -v dnf &> /dev/null; then
|
||||
dnf install -y $dependencies
|
||||
elif command -v yum &> /dev/null; then
|
||||
yum install -y $dependencies
|
||||
fi
|
||||
|
||||
echo "依赖已安装。"
|
||||
}
|
||||
|
||||
|
||||
|
||||
# 检查防火墙配置
|
||||
function check_firewall_configuration() {
|
||||
local os_name=$(uname -s)
|
||||
|
|
Loading…
Reference in New Issue
Block a user