This commit is contained in:
eddy
2026-06-06 23:30:58 +08:00
parent aa7a2d7a76
commit 6bf67968a5
+2 -12
View File
@@ -6,23 +6,13 @@ set -euo pipefail
port80=8150 port80=8150
access_code=kns12345678
ipv4_address=$(curl -fsS --max-time 10 ipv4.ip.sb || true) ipv4_address=$(curl -fsS --max-time 10 ipv4.ip.sb || true)
if [ -z "$ipv4_address" ]; then if [ -z "$ipv4_address" ]; then
ipv4_address="服务器IP" ipv4_address="服务器IP"
fi fi
generate_access_code() {
if command -v openssl >/dev/null 2>&1; then
openssl rand -hex 16
elif [ -r /proc/sys/kernel/random/uuid ]; then
tr -d '-' < /proc/sys/kernel/random/uuid
else
echo "changeme"
fi
}
access_code=$(generate_access_code)
# 1、更新包 # 1、更新包
apt update -y && apt upgrade -y # 更新一下包 apt update -y && apt upgrade -y # 更新一下包