Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

Commit

Permalink
check if acme.sh already installed
Browse files Browse the repository at this point in the history
if it's installed no need to reinstall it
  • Loading branch information
tacrazymage authored Oct 25, 2022
1 parent 6bb012e commit a208b63
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions x-ui_en.sh
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,15 @@ install_acme() {

#method for standalone mode
ssl_cert_issue_standalone() {
#install acme first
install_acme
if [ $? -ne 0 ]; then
LOGE "install acme failed,please check logs"
exit 1
#check for acme.sh first
if ! command -v ~/.acme.sh/acme.sh &> /dev/null
then
echo "acme.sh could not be found. we will install it"
install_acme
if [ $? -ne 0 ]; then
LOGE "install acme failed, please check logs"
exit 1
fi
fi
#install socat second
if [[ x"${release}" == x"centos" ]]; then
Expand All @@ -462,7 +466,7 @@ ssl_cert_issue_standalone() {
apt install socat -y
fi
if [ $? -ne 0 ]; then
LOGE "install socat failed,please check logs"
LOGE "install socat failed, please check logs"
exit 1
else
LOGI "install socat succeed..."
Expand Down

0 comments on commit a208b63

Please sign in to comment.