|
|
@@ -60,10 +60,20 @@ check_hestia_demo_mode
|
|
|
if [ -n "$DNS_SYSTEM" ]; then
|
|
|
dns_domain=$($BIN/v-list-dns-domains "$user" | grep "$domain" | cut -d' ' -f1)
|
|
|
caa_record=$($BIN/v-list-dns-records "$user" "$domain" | grep -i "letsencrypt" | cut -d' ' -f1)
|
|
|
-
|
|
|
+
|
|
|
if [ "$dns_domain" = "$domain" ]; then
|
|
|
if [ -n "$caa_record" ]; then
|
|
|
- $BIN/v-delete-dns-record "$user" "$domain" "$caa_record"
|
|
|
+ if [ -z "$mail" ]; then
|
|
|
+ mail_exists=$(is_object_value_exist 'mail' 'DOMAIN' "$domain" '$LETSENCRYPT');
|
|
|
+ if [ "$mail_exists" != '' ]; then
|
|
|
+ $BIN/v-delete-dns-record "$user" "$domain" "$caa_record"
|
|
|
+ fi
|
|
|
+ else
|
|
|
+ web_exists=$(is_object_value_exist 'web' 'DOMAIN' "$domain" '$LETSENCRYPT');
|
|
|
+ if [ "$web_exists" != '' ]; then
|
|
|
+ $BIN/v-delete-dns-record "$user" "$domain" "$caa_record"
|
|
|
+ fi
|
|
|
+ fi
|
|
|
fi
|
|
|
fi
|
|
|
fi
|