cPanel get domain list via SSH

for line in `cat /etc/userdomains | sed s/[[:space:]]*//g | grep -v "^\*"`; do DOMAIN=`echo ${line} | cut -d ":" -f 1`; USERNAME=`echo ${line} | cut -d ":" -f 2`; if [ ! -f "/var/cpanel/suspended/${USERNAME}" ]; then echo ${DOMAIN}; fi; done

Leave a Reply

Your email address will not be published. Required fields are marked *