mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-06-15 20:12:47 +00:00
Merge f7fb49c9f9a6bed43a05670f746b4c9bed4fbac8 into 762978f8d8a7fcc7308e4b8c6e5b1cf3747014e6
This commit is contained in:
commit
e25da1202e
@ -135,6 +135,7 @@ Parameters:
|
|||||||
|
|
||||||
--webroot, -w /path/to/webroot Specifies the web root folder for web root mode.
|
--webroot, -w /path/to/webroot Specifies the web root folder for web root mode.
|
||||||
--standalone Use standalone mode.
|
--standalone Use standalone mode.
|
||||||
|
--standalonePort The port to bind the HTTP server to, if in standalone mode.
|
||||||
--apache Use apache mode.
|
--apache Use apache mode.
|
||||||
--dns [dns-cf|dns-dp|dns-cx|/path/to/api/file] Use dns mode or dns api.
|
--dns [dns-cf|dns-dp|dns-cx|/path/to/api/file] Use dns mode or dns api.
|
||||||
|
|
||||||
@ -212,9 +213,10 @@ The cert will be `renewed every 80 days by default` (which is configurable). Onc
|
|||||||
**(requires you be root/sudoer, or you have permission to listen tcp 80 port)**
|
**(requires you be root/sudoer, or you have permission to listen tcp 80 port)**
|
||||||
|
|
||||||
The tcp `80` port **MUST** be free to listen, otherwise you will be prompted to free the `80` port and try again.
|
The tcp `80` port **MUST** be free to listen, otherwise you will be prompted to free the `80` port and try again.
|
||||||
|
If you can't run it as `root` and / or want to use another port, use the `--standalonePort` option.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
acme.sh --issue --standalone -d aa.com -d www.aa.com -d cp.aa.com
|
acme.sh --issue --standalone --standalonePort 8080 -d aa.com -d www.aa.com -d cp.aa.com
|
||||||
```
|
```
|
||||||
|
|
||||||
More examples: https://github.com/Neilpang/acme.sh/wiki/How-to-issue-a-cert
|
More examples: https://github.com/Neilpang/acme.sh/wiki/How-to-issue-a-cert
|
||||||
|
16
acme.sh
16
acme.sh
@ -1013,6 +1013,7 @@ issue() {
|
|||||||
Le_RealCACertPath="$7"
|
Le_RealCACertPath="$7"
|
||||||
Le_ReloadCmd="$8"
|
Le_ReloadCmd="$8"
|
||||||
Le_RealFullChainPath="$9"
|
Le_RealFullChainPath="$9"
|
||||||
|
Le_HTTPPort="${10}"
|
||||||
|
|
||||||
#remove these later.
|
#remove these later.
|
||||||
if [ "$Le_Webroot" = "dns-cf" ] ; then
|
if [ "$Le_Webroot" = "dns-cf" ] ; then
|
||||||
@ -1074,10 +1075,11 @@ issue() {
|
|||||||
_err "Please install netcat(nc) tools first."
|
_err "Please install netcat(nc) tools first."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$Le_HTTPPort" ] ; then
|
if [ "$Le_HTTPPort" = "no" ] ; then
|
||||||
Le_HTTPPort=80
|
Le_HTTPPort=80
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_setopt "$DOMAIN_CONF" "Le_HTTPPort" "=" "$Le_HTTPPort"
|
_setopt "$DOMAIN_CONF" "Le_HTTPPort" "=" "$Le_HTTPPort"
|
||||||
|
|
||||||
netprc="$(_ss "$Le_HTTPPort" | grep "$Le_HTTPPort")"
|
netprc="$(_ss "$Le_HTTPPort" | grep "$Le_HTTPPort")"
|
||||||
@ -1509,7 +1511,7 @@ renew() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
IS_RENEW="1"
|
IS_RENEW="1"
|
||||||
issue "$Le_Webroot" "$Le_Domain" "$Le_Alt" "$Le_Keylength" "$Le_RealCertPath" "$Le_RealKeyPath" "$Le_RealCACertPath" "$Le_ReloadCmd" "$Le_RealFullChainPath"
|
issue "$Le_Webroot" "$Le_Domain" "$Le_Alt" "$Le_Keylength" "$Le_RealCertPath" "$Le_RealKeyPath" "$Le_RealCACertPath" "$Le_ReloadCmd" "$Le_RealFullChainPath" "$Le_HTTPPort"
|
||||||
local res=$?
|
local res=$?
|
||||||
IS_RENEW=""
|
IS_RENEW=""
|
||||||
|
|
||||||
@ -2019,6 +2021,7 @@ Parameters:
|
|||||||
|
|
||||||
--webroot, -w /path/to/webroot Specifies the web root folder for web root mode.
|
--webroot, -w /path/to/webroot Specifies the web root folder for web root mode.
|
||||||
--standalone Use standalone mode.
|
--standalone Use standalone mode.
|
||||||
|
--standalonePort The port to bind the HTTP server to, if in standalone mode.
|
||||||
--apache Use apache mode.
|
--apache Use apache mode.
|
||||||
--dns [dns_cf|dns_dp|dns_cx|/path/to/api/file] Use dns mode or dns api.
|
--dns [dns_cf|dns_dp|dns_cx|/path/to/api/file] Use dns mode or dns api.
|
||||||
|
|
||||||
@ -2077,6 +2080,7 @@ _process() {
|
|||||||
_domain=""
|
_domain=""
|
||||||
_altdomains="no"
|
_altdomains="no"
|
||||||
_webroot=""
|
_webroot=""
|
||||||
|
_standalonePort="no"
|
||||||
_keylength="no"
|
_keylength="no"
|
||||||
_accountkeylength="no"
|
_accountkeylength="no"
|
||||||
_certpath="no"
|
_certpath="no"
|
||||||
@ -2196,6 +2200,10 @@ _process() {
|
|||||||
_webroot="$_webroot,$wvalue"
|
_webroot="$_webroot,$wvalue"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
--standalonePort)
|
||||||
|
_standalonePort="$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--apache)
|
--apache)
|
||||||
wvalue="apache"
|
wvalue="apache"
|
||||||
if [ -z "$_webroot" ] ; then
|
if [ -z "$_webroot" ] ; then
|
||||||
@ -2298,7 +2306,7 @@ _process() {
|
|||||||
install) install ;;
|
install) install ;;
|
||||||
uninstall) uninstall ;;
|
uninstall) uninstall ;;
|
||||||
issue)
|
issue)
|
||||||
issue "$_webroot" "$_domain" "$_altdomains" "$_keylength" "$_certpath" "$_keypath" "$_capath" "$_reloadcmd" "$_fullchainpath"
|
issue "$_webroot" "$_domain" "$_altdomains" "$_keylength" "$_certpath" "$_keypath" "$_capath" "$_reloadcmd" "$_fullchainpath" "$_standalonePort"
|
||||||
;;
|
;;
|
||||||
installcert)
|
installcert)
|
||||||
installcert "$_domain" "$_certpath" "$_keypath" "$_capath" "$_reloadcmd" "$_fullchainpath"
|
installcert "$_domain" "$_certpath" "$_keypath" "$_capath" "$_reloadcmd" "$_fullchainpath"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user