X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsystem%2Fadd_domain.sh;h=9a524f4e1fa5c1acd5e87133611c8f4b0063059d;hb=04e93c92f5208d4c4b195493bb6cbc4549969851;hp=80ebb2f37d0563e6d0d9b0d768d1e9b80a0797c3;hpb=5857529277c4b7f0ed96932be26020f28332a05c;p=feisty_meow.git diff --git a/scripts/system/add_domain.sh b/scripts/system/add_domain.sh index 80ebb2f3..9a524f4e 100644 --- a/scripts/system/add_domain.sh +++ b/scripts/system/add_domain.sh @@ -14,19 +14,28 @@ export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )" source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh" # some defaults that are convenient for current purposes. +# existing values will be respected over our defaults. -# hmmm: !!! these would need to be parameterized somehow for this script to become really general. - -# in our scheme, the single IP address that all our domains map to. -IP_ADDRESS="10.28.42.20" -# the email address (where first dot is replaced by @) for the administrator of the domain. -SERVER_ADMIN="developer.cakelampvm.com" -# the name of the name server for the new domains (should already be configured). -MAIN_NAME_SERVER="ns.cakelampvm.com" -# the name of the mail server for a new domain (should already be configured). -MAIL_SERVER="mail.cakelampvm.com" -# the distribution name to be listed in info for the new domain or subdomain. -DISTRO="ubuntu" +if [ -z "$IP_ADDRESS" ]; then + # in our scheme, the single IP address that all our domains map to. + IP_ADDRESS="10.28.42.20" +fi +if [ -z "$SERVER_ADMIN" ]; then + # the email address (where first dot is replaced by @) for the administrator of the domain. + SERVER_ADMIN="developer.cakelampvm.com" +fi +if [ -z "$MAIN_NAME_SERVER" ]; then + # the name of the name server for the new domains (should already be configured). + MAIN_NAME_SERVER="ns.cakelampvm.com" +fi +if [ -z "$MAIL_SERVER" ]; then + # the name of the mail server for a new domain (should already be configured). + MAIL_SERVER="mail.cakelampvm.com" +fi +if [ -z "$DISTRO" ]; then + # the distribution name to be listed in info for the new domain or subdomain. + DISTRO="ubuntu" +fi # creates a totally new domain config file for DNS. function write_new_domain_file()