Skip to content

Commit

Permalink
update install_acme
Browse files Browse the repository at this point in the history
  • Loading branch information
MHSanaei committed Oct 7, 2024
1 parent e72f67c commit 761eb5f
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions x-ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -772,15 +772,23 @@ update_geo() {
}

install_acme() {
cd ~
LOGI "install acme..."
curl https://get.acme.sh | sh
# Check if acme.sh is already installed
if command -v ~/.acme.sh/acme.sh &>/dev/null; then
LOGI "acme.sh is already installed."
return 0
fi

LOGI "Installing acme.sh..."
cd ~ || return 1 # Ensure you can change to the home directory

curl -s https://get.acme.sh | sh
if [ $? -ne 0 ]; then
LOGE "install acme failed"
LOGE "Installation of acme.sh failed."
return 1
else
LOGI "install acme succeed"
LOGI "Installation of acme.sh succeeded."
fi

return 0
}

Expand Down

0 comments on commit 761eb5f

Please sign in to comment.