Web Hosting Talk







View Full Version : Looking for a simple bash script that can delete dns zones from cPanel


sharmaine1111
09-24-2009, 10:29 AM
I'm looking for a simple bash script that can be run using cron that will delete dns zones (in cPanel) not pinging or resolving. Do you know any script that will be capable of handling that?

Syslint
09-28-2009, 01:03 AM
Create a script as follows ,
--------------
#!/bin/bash
for i in `cat /etc/userdomains | cut -d ":" -f1 | uniq | sort -n| grep -v '*'`
do
/scripts/killdns $i
done
-------------------