That’s even with a custom subdomain/domain name and not just the IP? If that’s the case, sounds more like you did something incredibly right. I tried it with a custom domain and the result is as expressed. The reason being this bit…
function _quickconsole() {
CONSOLEIP=$(ip route get 8.8.8.8 | awk 'NR==1 {print $NF}')
sed -i -e "s/console-username/${username}/g" \
-e "s/console-password/${password}/g" \
-e "s/ipaccess/$CONSOLEIP/g" /home/${username}/.console/index.php
}
It plants an IP and not a FQDN. I think this could be changed with a _askiffqdn function. Then if yes it would be more like…
function _quickconsole() {
CONSOLEIP=$(ip route get 8.8.8.8 | awk 'NR==1 {print $NF}')
sed -i -e "s/console-username/${username}/g" \
-e "s/console-password/${password}/g" /home/${username}/.console/index.php
if [[ ${usefqdn} == "yes" ]]; then
sed -i "s/ipaccess/$FQDN/g" /home/${username}/.console/index.php
else
sed -i "s/ipaccess/$CONSOLEIP/g" /home/${username}/.console/index.php
fi
}