mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-04-16 04:25:46 +00:00
fix: add openssl to install_base deps and fix comment style
This commit is contained in:
parent
b01a71f32d
commit
56af2dfe4b
1 changed files with 10 additions and 10 deletions
18
install.sh
18
install.sh
|
|
@ -76,36 +76,36 @@ is_port_in_use() {
|
|||
install_base() {
|
||||
case "${release}" in
|
||||
ubuntu | debian | armbian)
|
||||
apt-get update && apt-get install -y -q cron curl tar tzdata socat ca-certificates
|
||||
apt-get update && apt-get install -y -q cron curl tar tzdata socat ca-certificates openssl
|
||||
;;
|
||||
fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
|
||||
dnf -y update && dnf install -y -q curl tar tzdata socat ca-certificates
|
||||
dnf -y update && dnf install -y -q curl tar tzdata socat ca-certificates openssl
|
||||
;;
|
||||
centos)
|
||||
if [[ "${VERSION_ID}" =~ ^7 ]]; then
|
||||
yum -y update && yum install -y curl tar tzdata socat ca-certificates
|
||||
yum -y update && yum install -y curl tar tzdata socat ca-certificates openssl
|
||||
else
|
||||
dnf -y update && dnf install -y -q curl tar tzdata socat ca-certificates
|
||||
dnf -y update && dnf install -y -q curl tar tzdata socat ca-certificates openssl
|
||||
fi
|
||||
;;
|
||||
arch | manjaro | parch)
|
||||
pacman -Syu && pacman -Syu --noconfirm curl tar tzdata socat ca-certificates
|
||||
pacman -Syu && pacman -Syu --noconfirm curl tar tzdata socat ca-certificates openssl
|
||||
;;
|
||||
opensuse-tumbleweed | opensuse-leap)
|
||||
zypper refresh && zypper -q install -y curl tar timezone socat ca-certificates
|
||||
zypper refresh && zypper -q install -y curl tar timezone socat ca-certificates openssl
|
||||
;;
|
||||
alpine)
|
||||
apk update && apk add curl tar tzdata socat ca-certificates
|
||||
apk update && apk add curl tar tzdata socat ca-certificates openssl
|
||||
;;
|
||||
*)
|
||||
apt-get update && apt-get install -y -q curl tar tzdata socat ca-certificates
|
||||
apt-get update && apt-get install -y -q curl tar tzdata socat ca-certificates openssl
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
gen_random_string() {
|
||||
local length="$1"
|
||||
# openssl output base64,no need /dev/urandom + tr
|
||||
# openssl output base64, no need /dev/urandom + tr
|
||||
openssl rand -base64 $(( length * 2 )) \
|
||||
| tr -dc 'a-zA-Z0-9' \
|
||||
| head -c "$length"
|
||||
|
|
|
|||
Loading…
Reference in a new issue