#!/bin/bash 
## create.sh: Creates the domain and its users

domain=maitycraft.com
account=maitycraft
passwd=m-H0t-aitycraft

echo =======================================
echo == $domain create account=$account
echo =======================================

#echo === drop account=$account
#whmapi0 removeacct  username=$account keepdns=0

echo ""
echo === pre-create ownership account=$account
/scripts/whoowns $domain

echo "";echo "";
echo === create account=$account
whmapi0 createacct \
     username=$account domain=$domain \
     password=$passwd \
     contactemail=emails@hotdoodle.com \
     plan=hd_mailonly cpmod=paper_lantern \
     useregns=1 hasuseregns=1 forcedns=1 \
     mxcheck=local \
     > create.txt 2>&1

cat create.txt

echo ""
echo === confirm ownership account=$account
/scripts/whoowns $domain


#echo "";echo "";echo "";echo "";


