mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
update install_acme
This commit is contained in:
parent
e72f67ca54
commit
761eb5f384
1 changed files with 13 additions and 5 deletions
18
x-ui.sh
18
x-ui.sh
|
@ -772,15 +772,23 @@ update_geo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_acme() {
|
install_acme() {
|
||||||
cd ~
|
# Check if acme.sh is already installed
|
||||||
LOGI "install acme..."
|
if command -v ~/.acme.sh/acme.sh &>/dev/null; then
|
||||||
curl https://get.acme.sh | sh
|
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
|
if [ $? -ne 0 ]; then
|
||||||
LOGE "install acme failed"
|
LOGE "Installation of acme.sh failed."
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
LOGI "install acme succeed"
|
LOGI "Installation of acme.sh succeeded."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue