Skip to content

Commit

Permalink
OS Support - Amazon Linux (MHSanaei#2564)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelkogen authored and aircross committed Sep 25, 2024
1 parent c18a934 commit c264753
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.es_ES.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ if you want to purchase some virtual servers,you can purchase by my aff link:
- AlmaLinux 9+
- Rockylinux 9+
- OpenSUSE Tubleweed
- Amazon Linux 2023
## Arquitecturas y Dispositivos Compatibles
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ systemctl restart x-ui
- AlmaLinux 9+
- Rockylinux 9+
- OpenSUSE Tubleweed
- Amazon Linux 2023

## 支持的架构和设备
<details>
Expand Down
1 change: 1 addition & 0 deletions README.ru_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ if you want to purchase some virtual servers,you can purchase by my aff link:
- Rocky Linux 9+
- Oracle Linux 8+
- OpenSUSE Tubleweed
- Amazon Linux 2023
## Поддерживаемые архитектуры и устройства
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ require (
github.com/mymmrac/telego v0.31.3
github.com/nicksnyder/go-i18n/v2 v2.4.0
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/pelletier/go-toml/v2 v2.2.3
j github.com/pelletier/go-toml/v2 v2.2.3
github.com/robfig/cron/v3 v3.0.1
github.com/shirou/gopsutil/v4 v4.24.8
github.com/valyala/fasthttp v1.55.0
github.com/xtls/xray-core v1.8.24
go.uber.org/atomic v1.11.0
golang.org/x/text v0.18.0
google.golang.org/grpc v1.67.0
google.golang.org/grpc v1.66.2
gorm.io/driver/sqlite v1.5.6
gorm.io/gorm v1.25.12
)
Expand Down
10 changes: 7 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ arch() {
echo "arch: $(arch)"

os_version=""
os_version=$(grep -i version_id /etc/os-release | cut -d \" -f2 | cut -d . -f1)
os_version=$(grep "^VERSION_ID" /etc/os-release | cut -d '=' -f2 | tr -d '"')

if [[ "${release}" == "arch" ]]; then
echo "Your OS is Arch Linux"
elif [[ "${release}" == "parch" ]]; then
echo "Your OS is Parch linux"
echo "Your OS is Parch Linux"
elif [[ "${release}" == "manjaro" ]]; then
echo "Your OS is Manjaro"
elif [[ "${release}" == "armbian" ]]; then
Expand All @@ -63,6 +63,10 @@ elif [[ "${release}" == "fedora" ]]; then
if [[ ${os_version} -lt 36 ]]; then
echo -e "${red} Please use Fedora 36 or higher version!${plain}\n" && exit 1
fi
elif [[ "${release}" == "amzn" ]]; then
if [[ ${os_version} != "2023" ]]; then
echo -e "${red} Please use Amazon Linux 2023!${plain}\n" && exit 1
fi
elif [[ "${release}" == "debian" ]]; then
if [[ ${os_version} -lt 11 ]]; then
echo -e "${red} Please use Debian 11 or higher ${plain}\n" && exit 1
Expand Down Expand Up @@ -94,8 +98,8 @@ else
echo "- Rocky Linux 9+"
echo "- Oracle Linux 8+"
echo "- OpenSUSE Tumbleweed"
echo "- Amazon Linux 2023"
exit 1

fi

install_base() {
Expand Down
10 changes: 7 additions & 3 deletions x-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ fi
echo "The OS release is: $release"

os_version=""
os_version=$(grep -i version_id /etc/os-release | cut -d \" -f2 | cut -d . -f1)
os_version=$(grep "^VERSION_ID" /etc/os-release | cut -d '=' -f2 | tr -d '"')

if [[ "${release}" == "arch" ]]; then
echo "Your OS is Arch Linux"
elif [[ "${release}" == "parch" ]]; then
echo "Your OS is Parch linux"
echo "Your OS is Parch Linux"
elif [[ "${release}" == "manjaro" ]]; then
echo "Your OS is Manjaro"
elif [[ "${release}" == "armbian" ]]; then
Expand All @@ -60,6 +60,10 @@ elif [[ "${release}" == "fedora" ]]; then
if [[ ${os_version} -lt 36 ]]; then
echo -e "${red} Please use Fedora 36 or higher version!${plain}\n" && exit 1
fi
elif [[ "${release}" == "amzn" ]]; then
if [[ ${os_version} != "2023" ]]; then
echo -e "${red} Please use Amazon Linux 2023!${plain}\n" && exit 1
fi
elif [[ "${release}" == "debian" ]]; then
if [[ ${os_version} -lt 11 ]]; then
echo -e "${red} Please use Debian 11 or higher ${plain}\n" && exit 1
Expand Down Expand Up @@ -91,8 +95,8 @@ else
echo "- Rocky Linux 9+"
echo "- Oracle Linux 8+"
echo "- OpenSUSE Tumbleweed"
echo "- Amazon Linux 2023"
exit 1

fi

# Declare Variables
Expand Down

0 comments on commit c264753

Please sign in to comment.