byod/byod

13 lines
331 B
Bash
Executable File

#!/bin/sh
echo "Please enter new domain"
read domain
if [[ $(dig +short a $domain) == $(dig +short a tilde.best) ]]; then
mkdir ~/$domain
echo $domain > ~/byod
echo "once an admin confirms the domain, the webroot will be ~/$domain"
else
echo "please set an A record for $domain for $(dig +short a tilde.best)"
fi