|
@ -435,8 +435,10 @@ _secure_debug3() { |
|
|
fi |
|
|
fi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__USE_TR_RAW="$([ "$(echo "abc" | tr a-z A-Z 2>/dev/null)" = "ABC" ] && echo 1 || echo 0)" |
|
|
|
|
|
|
|
|
_upper_case() { |
|
|
_upper_case() { |
|
|
if _is_solaris; then |
|
|
|
|
|
|
|
|
if [ "$__USE_TR_RAW" = "0" ]; then |
|
|
tr '[:lower:]' '[:upper:]' |
|
|
tr '[:lower:]' '[:upper:]' |
|
|
else |
|
|
else |
|
|
# shellcheck disable=SC2018,SC2019 |
|
|
# shellcheck disable=SC2018,SC2019 |
|
@ -445,7 +447,7 @@ _upper_case() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
_lower_case() { |
|
|
_lower_case() { |
|
|
if _is_solaris; then |
|
|
|
|
|
|
|
|
if [ "$__USE_TR_RAW" = "0" ]; then |
|
|
tr '[:upper:]' '[:lower:]' |
|
|
tr '[:upper:]' '[:lower:]' |
|
|
else |
|
|
else |
|
|
# shellcheck disable=SC2018,SC2019 |
|
|
# shellcheck disable=SC2018,SC2019 |
|
@ -5752,7 +5754,9 @@ _installcert() { |
|
|
if [ -f "$_real_cert" ] && [ ! "$_ACME_IS_RENEW" ]; then |
|
|
if [ -f "$_real_cert" ] && [ ! "$_ACME_IS_RENEW" ]; then |
|
|
cp "$_real_cert" "$_backup_path/cert.bak" |
|
|
cp "$_real_cert" "$_backup_path/cert.bak" |
|
|
fi |
|
|
fi |
|
|
cat "$CERT_PATH" >"$_real_cert" || return 1 |
|
|
|
|
|
|
|
|
if [ "$CERT_PATH" != "$_real_cert" ]; then |
|
|
|
|
|
cat "$CERT_PATH" >"$_real_cert" || return 1 |
|
|
|
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
if [ "$_real_ca" ]; then |
|
|
if [ "$_real_ca" ]; then |
|
@ -5764,7 +5768,9 @@ _installcert() { |
|
|
if [ -f "$_real_ca" ] && [ ! "$_ACME_IS_RENEW" ]; then |
|
|
if [ -f "$_real_ca" ] && [ ! "$_ACME_IS_RENEW" ]; then |
|
|
cp "$_real_ca" "$_backup_path/ca.bak" |
|
|
cp "$_real_ca" "$_backup_path/ca.bak" |
|
|
fi |
|
|
fi |
|
|
cat "$CA_CERT_PATH" >"$_real_ca" || return 1 |
|
|
|
|
|
|
|
|
if [ "$CA_CERT_PATH" != "$_real_ca" ]; then |
|
|
|
|
|
cat "$CA_CERT_PATH" >"$_real_ca" || return 1 |
|
|
|
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
@ -5773,12 +5779,14 @@ _installcert() { |
|
|
if [ -f "$_real_key" ] && [ ! "$_ACME_IS_RENEW" ]; then |
|
|
if [ -f "$_real_key" ] && [ ! "$_ACME_IS_RENEW" ]; then |
|
|
cp "$_real_key" "$_backup_path/key.bak" |
|
|
cp "$_real_key" "$_backup_path/key.bak" |
|
|
fi |
|
|
fi |
|
|
if [ -f "$_real_key" ]; then |
|
|
|
|
|
cat "$CERT_KEY_PATH" >"$_real_key" || return 1 |
|
|
|
|
|
else |
|
|
|
|
|
touch "$_real_key" || return 1 |
|
|
|
|
|
chmod 600 "$_real_key" |
|
|
|
|
|
cat "$CERT_KEY_PATH" >"$_real_key" || return 1 |
|
|
|
|
|
|
|
|
if [ "$CERT_KEY_PATH" != "$_real_key" ]; then |
|
|
|
|
|
if [ -f "$_real_key" ]; then |
|
|
|
|
|
cat "$CERT_KEY_PATH" >"$_real_key" || return 1 |
|
|
|
|
|
else |
|
|
|
|
|
touch "$_real_key" || return 1 |
|
|
|
|
|
chmod 600 "$_real_key" |
|
|
|
|
|
cat "$CERT_KEY_PATH" >"$_real_key" || return 1 |
|
|
|
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
@ -5787,7 +5795,9 @@ _installcert() { |
|
|
if [ -f "$_real_fullchain" ] && [ ! "$_ACME_IS_RENEW" ]; then |
|
|
if [ -f "$_real_fullchain" ] && [ ! "$_ACME_IS_RENEW" ]; then |
|
|
cp "$_real_fullchain" "$_backup_path/fullchain.bak" |
|
|
cp "$_real_fullchain" "$_backup_path/fullchain.bak" |
|
|
fi |
|
|
fi |
|
|
cat "$CERT_FULLCHAIN_PATH" >"$_real_fullchain" || return 1 |
|
|
|
|
|
|
|
|
if [ "$_real_fullchain" != "$CERT_FULLCHAIN_PATH" ]; then |
|
|
|
|
|
cat "$CERT_FULLCHAIN_PATH" >"$_real_fullchain" || return 1 |
|
|
|
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
if [ "$_reload_cmd" ]; then |
|
|
if [ "$_reload_cmd" ]; then |
|
|