Browse Source

Update DNS counters when changing template

Kristan Kenney 7 years ago
parent
commit
0fccd692d9
1 changed files with 5 additions and 0 deletions
  1. 5 0
      bin/v-change-dns-domain-tpl

+ 5 - 0
bin/v-change-dns-domain-tpl

@@ -137,6 +137,11 @@ fi
 update_object_value 'dns' 'DOMAIN' "$domain" '$TPL' "$template"
 update_object_value 'dns' 'DOMAIN' "$domain" '$RECORDS' "$records"
 
+# Rebuild DNS zone and update counters to ensure that it has updated correctly
+$BIN/v-rebuild-dns-domain $user $domain no
+$BIN/v-update-user-stats $user
+$BIN/v-update-user-counters $user
+
 # Restarting named
 $BIN/v-restart-dns $restart
 check_result $? "DNS restart failed" >/dev/null