mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-14 04:19:12 +00:00
Update package-rhel.sh
This commit is contained in:
parent
75f61a80e5
commit
a411d5b2ca
1 changed files with 18 additions and 1 deletions
|
@ -1,7 +1,24 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# Require Red Hat Enterprise Linux / Rocky Linux / AlmaLinux
|
# ===== Require Red Hat Enterprise Linux / Rocky Linux / AlmaLinux ======================
|
||||||
|
if [[ -r /etc/os-release ]]; then
|
||||||
|
. /etc/os-release
|
||||||
|
case "$ID" in
|
||||||
|
rhel|rocky|almalinux)
|
||||||
|
echo "[OK] Detected supported system: $NAME $VERSION_ID"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "[ERROR] Unsupported system: $NAME ($ID)."
|
||||||
|
echo "This script only supports Red Hat Enterprise Linux / Rocky Linux / AlmaLinux."
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "[ERROR] Cannot detect system (missing /etc/os-release)."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# ===== Config & Parse arguments =========================================================
|
# ===== Config & Parse arguments =========================================================
|
||||||
VERSION_ARG="${1:-}" # Pass version number like 7.13.8, or leave empty
|
VERSION_ARG="${1:-}" # Pass version number like 7.13.8, or leave empty
|
||||||
WITH_CORE="both" # Default: bundle both xray+sing-box
|
WITH_CORE="both" # Default: bundle both xray+sing-box
|
||||||
|
|
Loading…
Reference in a new issue