Add files via upload

This commit is contained in:
thakares authored and GitHub committed 2025-05-24 23:13:55 +05:30
1 parent b91a0ebcca
commit 8271dc27dc
16 files changed
+1183 -36

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
DB_PATH="/var/nx9-dns-server/dns.db"
ZONE="yourdomain.tld"
# Get today's date and an incremental suffix
DATE=$(date +%Y%m%d)
SERIAL_SUFFIX="01"
NEW_SERIAL="${DATE}${SERIAL_SUFFIX}"
# Update SOA value
sqlite3 "$DB_PATH" <<EOF
UPDATE dns_records
SET value = 'ns1.yourdomain.tld hostmaster.yourdomain.tld $NEW_SERIAL 10800 3600 604800 86400'
WHERE domain = '$ZONE' AND record_type = 'SOA';
EOF
echo "SOA record updated with serial: $NEW_SERIAL"