|
|
@ -4676,19 +4676,19 @@ _installcert() { |
|
|
|
if [ -f "$_real_cert" ] && [ ! "$IS_RENEW" ]; then |
|
|
|
cp "$_real_cert" "$_backup_path/cert.bak" |
|
|
|
fi |
|
|
|
cat "$CERT_PATH" >"$_real_cert" |
|
|
|
cat "$CERT_PATH" >"$_real_cert" || return 1 |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "$_real_ca" ]; then |
|
|
|
_info "Installing CA to:$_real_ca" |
|
|
|
if [ "$_real_ca" = "$_real_cert" ]; then |
|
|
|
echo "" >>"$_real_ca" |
|
|
|
cat "$CA_CERT_PATH" >>"$_real_ca" |
|
|
|
cat "$CA_CERT_PATH" >>"$_real_ca" || return 1 |
|
|
|
else |
|
|
|
if [ -f "$_real_ca" ] && [ ! "$IS_RENEW" ]; then |
|
|
|
cp "$_real_ca" "$_backup_path/ca.bak" |
|
|
|
fi |
|
|
|
cat "$CA_CERT_PATH" >"$_real_ca" |
|
|
|
cat "$CA_CERT_PATH" >"$_real_ca" || return 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
@ -4698,9 +4698,9 @@ _installcert() { |
|
|
|
cp "$_real_key" "$_backup_path/key.bak" |
|
|
|
fi |
|
|
|
if [ -f "$_real_key" ]; then |
|
|
|
cat "$CERT_KEY_PATH" >"$_real_key" |
|
|
|
cat "$CERT_KEY_PATH" >"$_real_key" || return 1 |
|
|
|
else |
|
|
|
cat "$CERT_KEY_PATH" >"$_real_key" |
|
|
|
cat "$CERT_KEY_PATH" >"$_real_key" || return 1 |
|
|
|
chmod 600 "$_real_key" |
|
|
|
fi |
|
|
|
fi |
|
|
@ -4710,7 +4710,7 @@ _installcert() { |
|
|
|
if [ -f "$_real_fullchain" ] && [ ! "$IS_RENEW" ]; then |
|
|
|
cp "$_real_fullchain" "$_backup_path/fullchain.bak" |
|
|
|
fi |
|
|
|
cat "$CERT_FULLCHAIN_PATH" >"$_real_fullchain" |
|
|
|
cat "$CERT_FULLCHAIN_PATH" >"$_real_fullchain" || return 1 |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "$_reload_cmd" ]; then |
|
|
|