diff --git a/acme.sh b/acme.sh index 8bff2e8436..106e930d36 100755 --- a/acme.sh +++ b/acme.sh @@ -5715,9 +5715,9 @@ install() { LE_WORKING_DIR="$DEFAULT_INSTALL_HOME" fi - _nocron="$1" + _nocron="${NOCRON:-$1}" _c_home="$2" - _noprofile="$3" + _noprofile="${NOPROFILE:-$3}" if ! _initpath; then _err "Install failed." return 1 @@ -5725,6 +5725,9 @@ install() { if [ "$_nocron" ]; then _debug "Skip install cron job" fi + if [ "$_noprofile" ]; then + _debug "Skip install aliases" + fi if [ "$ACME_IN_CRON" != "1" ]; then if ! _precheck "$_nocron"; then @@ -6141,8 +6144,23 @@ Parameters: # nocron noprofile _installOnline() { _info "Installing from online archive." - _nocron="$1" - _noprofile="$2" + + if ! _startswith "$1" "-"; then + if [ -n "$1" ]; then + set "$@" "--nocron" + fi + + shift + + if ! _startswith "$1" "-"; then + if [ -n "$1" ]; then + set "$@" "--noprofile" + fi + + shift + fi + fi + if [ ! "$BRANCH" ]; then BRANCH="master" fi @@ -6163,7 +6181,7 @@ _installOnline() { cd "$PROJECT_NAME-$BRANCH" chmod +x $PROJECT_ENTRY - if ./$PROJECT_ENTRY install "$_nocron" "" "$_noprofile"; then + if ./$PROJECT_ENTRY --install "$@"; then _info "Install success!" fi @@ -6179,7 +6197,7 @@ upgrade() { _initpath export LE_WORKING_DIR cd "$LE_WORKING_DIR" - _installOnline "nocron" "noprofile" + _installOnline "nocron" "" "noprofile" ); then _info "Upgrade success!" exit 0 @@ -6906,7 +6924,7 @@ _process() { if [ "$INSTALLONLINE" ]; then INSTALLONLINE="" - _installOnline + _installOnline "$@" exit fi