Scripts‎ > ‎

search_reseller_domains.sh

This will script will search in /etc/trueuserdomains for domains under a reseller in Cpanel.

############################################################################################
echo "Enter the name of the reseller";
read name;
filename=reseller_"$name"-`date +%d-%m-%Y_%H-%M-%S`;
touch "$filename";
echo "............Searching for domains under the Reseller: $name";
for i in `grep $name /etc/trueuserowners | sort -n | cut -d ":" -f 1`
do
grep ": $i" /etc/trueuserdomains >>"$filename";
done;
cat "$filename";
############################################################################################
Comments