mirror of
https://github.com/remnawave/scripts.git
synced 2026-05-13 12:16:44 +00:00
refactor: rewrite use bash to sh (#1)
This commit is contained in:
parent
6bc321c032
commit
1bb7ce5a11
1 changed files with 3 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
# Download Xray latest
|
||||
|
||||
|
|
@ -15,7 +15,7 @@ fi
|
|||
|
||||
check_if_running_as_root() {
|
||||
# If you want to run as another user, please modify $EUID to be owned by this user
|
||||
if [[ "$EUID" -ne '0' ]]; then
|
||||
if [[ "$(id -u)" -ne '0' ]]; then
|
||||
echo "error: You must run this script as root!"
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -86,7 +86,7 @@ download_xray() {
|
|||
else
|
||||
DOWNLOAD_LINK="https://github.com/$UPSTREAM_REPO/Xray-core/releases/download/$RELEASE_TAG/Xray-linux-$ARCH.zip"
|
||||
fi
|
||||
|
||||
|
||||
echo "Downloading Xray archive: $DOWNLOAD_LINK"
|
||||
if ! curl -RL -H 'Cache-Control: no-cache' -o "$ZIP_FILE" "$DOWNLOAD_LINK"; then
|
||||
echo 'error: Download failed! Please check your network or try again.'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue