From 7fb0ac6634d2d4df7fa97a0bdf6082a95fea1c6d Mon Sep 17 00:00:00 2001 From: vincent Date: Mon, 7 Feb 2022 20:30:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88httpport9999?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xray.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xray.sh b/xray.sh index 4e6e362..748b4ab 100644 --- a/xray.sh +++ b/xray.sh @@ -531,9 +531,9 @@ getCert() { if [[ -z ${CERT_FILE+x} ]]; then stopNginx systemctl stop xray - res=`netstat -ntlp| grep -E ':9999 '` + res=`netstat -ntlp| grep -E ':80 |:443 '` if [[ "${res}" != "" ]]; then - colorEcho ${RED} " 其他进程占用了9999端口,请先关闭再运行一键脚本" + colorEcho ${RED} " 其他进程占用了80或443端口,请先关闭再运行一键脚本" echo " 端口占用信息如下:" echo ${res} exit 1 @@ -554,9 +554,9 @@ getCert() { ~/.acme.sh/acme.sh --upgrade --auto-upgrade # ~/.acme.sh/acme.sh --set-default-ca --server letsencrypt if [[ "$BT" = "false" ]]; then - ~/.acme.sh/acme.sh --issue -d $DOMAIN --keylength ec-256 --pre-hook "systemctl stop nginx" --post-hook "systemctl restart nginx" --standalone --httpport 9999 + ~/.acme.sh/acme.sh --issue -d $DOMAIN --keylength ec-256 --pre-hook "systemctl stop nginx" --post-hook "systemctl restart nginx" --standalone else - ~/.acme.sh/acme.sh --issue -d $DOMAIN --keylength ec-256 --pre-hook "nginx -s stop || { echo -n ''; }" --post-hook "nginx -c /www/server/nginx/conf/nginx.conf || { echo -n ''; }" --standalone --httpport 9999 + ~/.acme.sh/acme.sh --issue -d $DOMAIN --keylength ec-256 --pre-hook "nginx -s stop || { echo -n ''; }" --post-hook "nginx -c /www/server/nginx/conf/nginx.conf || { echo -n ''; }" --standalone fi [[ -f ~/.acme.sh/${DOMAIN}_ecc/ca.cer ]] || { colorEcho $RED " 获取证书失败,请复制上面的红色文字到 https://hijk.art 反馈"