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