mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-11-20 05:11:43 +00:00
Catching up with the current state of things
Catching up with the current state of things
This commit is contained in:
commit
effc37a702
10
.github/workflows/dockerhub.yml
vendored
10
.github/workflows/dockerhub.yml
vendored
@ -33,12 +33,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: checkout code
|
- name: checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: install buildx
|
- name: Set up QEMU
|
||||||
id: buildx
|
uses: docker/setup-qemu-action@v1
|
||||||
uses: crazy-max/ghaction-docker-buildx@v3
|
- name: Set up Docker Buildx
|
||||||
with:
|
uses: docker/setup-buildx-action@v1
|
||||||
buildx-version: latest
|
|
||||||
qemu-version: latest
|
|
||||||
- name: login to docker hub
|
- name: login to docker hub
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
||||||
|
@ -110,13 +110,13 @@ https://github.com/acmesh-official/acmetest
|
|||||||
Check this project: https://github.com/acmesh-official/get.acme.sh
|
Check this project: https://github.com/acmesh-official/get.acme.sh
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl https://get.acme.sh | sh
|
curl https://get.acme.sh | sh -s email=my@example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
Or:
|
Or:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget -O - https://get.acme.sh | sh
|
wget -O - https://get.acme.sh | sh -s email=my@example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ Clone this project and launch installation:
|
|||||||
```bash
|
```bash
|
||||||
git clone https://github.com/acmesh-official/acme.sh.git
|
git clone https://github.com/acmesh-official/acme.sh.git
|
||||||
cd ./acme.sh
|
cd ./acme.sh
|
||||||
./acme.sh --install
|
./acme.sh --install -m my@example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
You `don't have to be root` then, although `it is recommended`.
|
You `don't have to be root` then, although `it is recommended`.
|
||||||
|
58
acme.sh
58
acme.sh
@ -6105,7 +6105,7 @@ _installalias() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# nocron confighome noprofile
|
# nocron confighome noprofile accountemail
|
||||||
install() {
|
install() {
|
||||||
|
|
||||||
if [ -z "$LE_WORKING_DIR" ]; then
|
if [ -z "$LE_WORKING_DIR" ]; then
|
||||||
@ -6115,6 +6115,8 @@ install() {
|
|||||||
_nocron="$1"
|
_nocron="$1"
|
||||||
_c_home="$2"
|
_c_home="$2"
|
||||||
_noprofile="$3"
|
_noprofile="$3"
|
||||||
|
_accountemail="$4"
|
||||||
|
|
||||||
if ! _initpath; then
|
if ! _initpath; then
|
||||||
_err "Install failed."
|
_err "Install failed."
|
||||||
return 1
|
return 1
|
||||||
@ -6233,6 +6235,10 @@ install() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$_accountemail" ]; then
|
||||||
|
_saveaccountconf "ACCOUNT_EMAIL" "$_accountemail"
|
||||||
|
fi
|
||||||
|
|
||||||
_info OK
|
_info OK
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6511,7 +6517,7 @@ Parameters:
|
|||||||
--cert-home <directory> Specifies the home dir to save all the certs, only valid for '--install' command.
|
--cert-home <directory> Specifies the home dir to save all the certs, only valid for '--install' command.
|
||||||
--config-home <directory> Specifies the home dir to save all the configurations.
|
--config-home <directory> Specifies the home dir to save all the configurations.
|
||||||
--useragent <string> Specifies the user agent string. it will be saved for future use too.
|
--useragent <string> Specifies the user agent string. it will be saved for future use too.
|
||||||
-m, --accountemail <email> Specifies the account email, only valid for the '--install' and '--update-account' command.
|
-m, --email <email> Specifies the account email, only valid for the '--install' and '--update-account' command.
|
||||||
--accountkey <file> Specifies the account key path, only valid for the '--install' command.
|
--accountkey <file> Specifies the account key path, only valid for the '--install' command.
|
||||||
--days <ndays> Specifies the days to renew the cert when using '--issue' command. The default value is $DEFAULT_RENEW days.
|
--days <ndays> Specifies the days to renew the cert when using '--issue' command. The default value is $DEFAULT_RENEW days.
|
||||||
--httpport <port> Specifies the standalone listening port. Only valid if the server is behind a reverse proxy or load balancer.
|
--httpport <port> Specifies the standalone listening port. Only valid if the server is behind a reverse proxy or load balancer.
|
||||||
@ -6522,9 +6528,9 @@ Parameters:
|
|||||||
--insecure Do not check the server certificate, in some devices, the api server's certificate may not be trusted.
|
--insecure Do not check the server certificate, in some devices, the api server's certificate may not be trusted.
|
||||||
--ca-bundle <file> Specifies the path to the CA certificate bundle to verify api server's certificate.
|
--ca-bundle <file> Specifies the path to the CA certificate bundle to verify api server's certificate.
|
||||||
--ca-path <directory> Specifies directory containing CA certificates in PEM format, used by wget or curl.
|
--ca-path <directory> Specifies directory containing CA certificates in PEM format, used by wget or curl.
|
||||||
--nocron Only valid for '--install' command, which means: do not install the default cron job.
|
--no-cron Only valid for '--install' command, which means: do not install the default cron job.
|
||||||
In this case, the certs will not be renewed automatically.
|
In this case, the certs will not be renewed automatically.
|
||||||
--noprofile Only valid for '--install' command, which means: do not install aliases to user profile.
|
--no-profile Only valid for '--install' command, which means: do not install aliases to user profile.
|
||||||
--no-color Do not output color text.
|
--no-color Do not output color text.
|
||||||
--force-color Force output of color text. Useful for non-interactive use with the aha tool for HTML E-Mails.
|
--force-color Force output of color text. Useful for non-interactive use with the aha tool for HTML E-Mails.
|
||||||
--ecc Specifies to use the ECC cert. Valid for '--install-cert', '--renew', '--revoke', '--to-pkcs12' and '--create-csr'
|
--ecc Specifies to use the ECC cert. Valid for '--install-cert', '--renew', '--revoke', '--to-pkcs12' and '--create-csr'
|
||||||
@ -6562,18 +6568,17 @@ Parameters:
|
|||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
# nocron noprofile
|
installOnline() {
|
||||||
_installOnline() {
|
|
||||||
_info "Installing from online archive."
|
_info "Installing from online archive."
|
||||||
_nocron="$1"
|
|
||||||
_noprofile="$2"
|
_branch="$BRANCH"
|
||||||
if [ ! "$BRANCH" ]; then
|
if [ -z "$_branch" ]; then
|
||||||
BRANCH="master"
|
_branch="master"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
target="$PROJECT/archive/$BRANCH.tar.gz"
|
target="$PROJECT/archive/$_branch.tar.gz"
|
||||||
_info "Downloading $target"
|
_info "Downloading $target"
|
||||||
localname="$BRANCH.tar.gz"
|
localname="$_branch.tar.gz"
|
||||||
if ! _get "$target" >$localname; then
|
if ! _get "$target" >$localname; then
|
||||||
_err "Download error."
|
_err "Download error."
|
||||||
return 1
|
return 1
|
||||||
@ -6585,9 +6590,9 @@ _installOnline() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$PROJECT_NAME-$BRANCH"
|
cd "$PROJECT_NAME-$_branch"
|
||||||
chmod +x $PROJECT_ENTRY
|
chmod +x $PROJECT_ENTRY
|
||||||
if ./$PROJECT_ENTRY install "$_nocron" "" "$_noprofile"; then
|
if ./$PROJECT_ENTRY --install "$@"; then
|
||||||
_info "Install success!"
|
_info "Install success!"
|
||||||
_initpath
|
_initpath
|
||||||
_saveaccountconf "UPGRADE_HASH" "$(_getUpgradeHash)"
|
_saveaccountconf "UPGRADE_HASH" "$(_getUpgradeHash)"
|
||||||
@ -6595,7 +6600,7 @@ _installOnline() {
|
|||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
rm -rf "$PROJECT_NAME-$BRANCH"
|
rm -rf "$PROJECT_NAME-$_branch"
|
||||||
rm -f "$localname"
|
rm -f "$localname"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -6623,7 +6628,7 @@ upgrade() {
|
|||||||
[ -z "$FORCE" ] && [ "$(_getUpgradeHash)" = "$(_readaccountconf "UPGRADE_HASH")" ] && _info "Already uptodate!" && exit 0
|
[ -z "$FORCE" ] && [ "$(_getUpgradeHash)" = "$(_readaccountconf "UPGRADE_HASH")" ] && _info "Already uptodate!" && exit 0
|
||||||
export LE_WORKING_DIR
|
export LE_WORKING_DIR
|
||||||
cd "$LE_WORKING_DIR"
|
cd "$LE_WORKING_DIR"
|
||||||
_installOnline "nocron" "noprofile"
|
installOnline "--nocron" "--noprofile"
|
||||||
); then
|
); then
|
||||||
_info "Upgrade success!"
|
_info "Upgrade success!"
|
||||||
exit 0
|
exit 0
|
||||||
@ -6803,6 +6808,11 @@ _process() {
|
|||||||
--install)
|
--install)
|
||||||
_CMD="install"
|
_CMD="install"
|
||||||
;;
|
;;
|
||||||
|
--install-online)
|
||||||
|
shift
|
||||||
|
installOnline "$@"
|
||||||
|
return
|
||||||
|
;;
|
||||||
--uninstall)
|
--uninstall)
|
||||||
_CMD="uninstall"
|
_CMD="uninstall"
|
||||||
;;
|
;;
|
||||||
@ -7077,9 +7087,9 @@ _process() {
|
|||||||
USER_AGENT="$_useragent"
|
USER_AGENT="$_useragent"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-m | --accountemail)
|
-m | --email | --accountemail)
|
||||||
_accountemail="$2"
|
_accountemail="$2"
|
||||||
ACCOUNT_EMAIL="$_accountemail"
|
export ACCOUNT_EMAIL="$_accountemail"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--accountkey)
|
--accountkey)
|
||||||
@ -7122,10 +7132,10 @@ _process() {
|
|||||||
CA_PATH="$_ca_path"
|
CA_PATH="$_ca_path"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--nocron)
|
--no-cron | --nocron)
|
||||||
_nocron="1"
|
_nocron="1"
|
||||||
;;
|
;;
|
||||||
--noprofile)
|
--no-profile | --noprofile)
|
||||||
_noprofile="1"
|
_noprofile="1"
|
||||||
;;
|
;;
|
||||||
--no-color)
|
--no-color)
|
||||||
@ -7345,7 +7355,7 @@ _process() {
|
|||||||
fi
|
fi
|
||||||
_debug "Running cmd: ${_CMD}"
|
_debug "Running cmd: ${_CMD}"
|
||||||
case "${_CMD}" in
|
case "${_CMD}" in
|
||||||
install) install "$_nocron" "$_confighome" "$_noprofile" ;;
|
install) install "$_nocron" "$_confighome" "$_noprofile" "$_accountemail" ;;
|
||||||
uninstall) uninstall "$_nocron" ;;
|
uninstall) uninstall "$_nocron" ;;
|
||||||
upgrade) upgrade ;;
|
upgrade) upgrade ;;
|
||||||
issue)
|
issue)
|
||||||
@ -7458,12 +7468,6 @@ _process() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$INSTALLONLINE" ]; then
|
|
||||||
INSTALLONLINE=""
|
|
||||||
_installOnline
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
[ -z "$1" ] && showhelp && return
|
[ -z "$1" ] && showhelp && return
|
||||||
if _startswith "$1" '-'; then _process "$@"; else "$@"; fi
|
if _startswith "$1" '-'; then _process "$@"; else "$@"; fi
|
||||||
|
@ -157,7 +157,7 @@ _namecheap_set_publicip() {
|
|||||||
|
|
||||||
if [ -z "$NAMECHEAP_SOURCEIP" ]; then
|
if [ -z "$NAMECHEAP_SOURCEIP" ]; then
|
||||||
_err "No Source IP specified for Namecheap API."
|
_err "No Source IP specified for Namecheap API."
|
||||||
_err "Use your public ip address or an url to retrieve it (e.g. https://ipconfig.co/ip) and export it as NAMECHEAP_SOURCEIP"
|
_err "Use your public ip address or an url to retrieve it (e.g. https://ifconfig.co/ip) and export it as NAMECHEAP_SOURCEIP"
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
_saveaccountconf NAMECHEAP_SOURCEIP "$NAMECHEAP_SOURCEIP"
|
_saveaccountconf NAMECHEAP_SOURCEIP "$NAMECHEAP_SOURCEIP"
|
||||||
@ -175,7 +175,7 @@ _namecheap_set_publicip() {
|
|||||||
_publicip=$(_get "$addr")
|
_publicip=$(_get "$addr")
|
||||||
else
|
else
|
||||||
_err "No Source IP specified for Namecheap API."
|
_err "No Source IP specified for Namecheap API."
|
||||||
_err "Use your public ip address or an url to retrieve it (e.g. https://ipconfig.co/ip) and export it as NAMECHEAP_SOURCEIP"
|
_err "Use your public ip address or an url to retrieve it (e.g. https://ifconfig.co/ip) and export it as NAMECHEAP_SOURCEIP"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user