From: Chris Koeritz Date: Fri, 18 May 2018 23:23:35 +0000 (-0400) Subject: pushing down some cakelampvm details X-Git-Tag: 2.140.112^2~29 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=dbebc751162f353ca8a4df80656e96bf51d37e01 pushing down some cakelampvm details want to abstract out any cakelampvm or siteavenger specifics from the general levels of scripts. --- diff --git a/scripts/core/common.alias b/scripts/core/common.alias index 25c5f87f..354689b9 100644 --- a/scripts/core/common.alias +++ b/scripts/core/common.alias @@ -114,8 +114,13 @@ define_yeti_alias add_apache_site="sudo bash \$FEISTY_MEOW_SCRIPTS/system/add_ap define_yeti_alias remove_apache_site="sudo bash \$FEISTY_MEOW_SCRIPTS/system/remove_apache_site.sh" define_yeti_alias add_swap_mount="sudo bash \$FEISTY_MEOW_SCRIPTS/system/add_swap_mount.sh" -# some site avenger sudoized aliases. -define_yeti_alias revamp_cakelampvm="sudo bash \"$FEISTY_MEOW_SCRIPTS/site_avenger/revamp_cakelampvm.sh\"" +### some site avenger sudoized aliases. +##define_yeti_alias revamp_cakelampvm="echo -e '\ +##You might want to run one of these commands to perform the revamp process,\n +##depending on your VM version:\n'; +##for i in $FEISTY_MEOW_SCRIPTS/site_avenger/revamp_cakelampvm*; do +## echo sudo bash \"$FEISTY_MEOW_SCRIPTS/site_avenger/$(basename $i)\"; +##done" ############## diff --git a/scripts/customize/developer/developer_common.alias b/scripts/customize/developer/developer_common.alias new file mode 100644 index 00000000..d308977e --- /dev/null +++ b/scripts/customize/developer/developer_common.alias @@ -0,0 +1,14 @@ + +# overrides for the developer user, who is assumed to be running on a +# cakelampvm machine. + +# some site avenger sudoized aliases. + +define_yeti_alias revamp_cakelampvm="echo -e '\ +You might want to run one of these commands to perform the revamp process,\n +depending on your VM version:\n'; +for i in $FEISTY_MEOW_SCRIPTS/site_avenger/revamp_cakelampvm*; do + echo sudo bash \"$FEISTY_MEOW_SCRIPTS/site_avenger/$(basename $i)\"; +done" + + diff --git a/scripts/networking/get_ip_addresses.sh b/scripts/networking/get_ip_addresses.sh index d605b2ac..72efdf2c 100644 --- a/scripts/networking/get_ip_addresses.sh +++ b/scripts/networking/get_ip_addresses.sh @@ -1 +1 @@ -ifconfig | grep "inet addr:" | sed -e "s/^.*addr:\([0-9.]*\) .*$/\1/" +ifconfig | grep "inet " | sed -e "s/^.*inet \([0-9.]*\) .*$/\1/" diff --git a/scripts/system/add_domain.sh b/scripts/system/add_domain.sh index 78009042..711bca44 100644 --- a/scripts/system/add_domain.sh +++ b/scripts/system/add_domain.sh @@ -21,23 +21,28 @@ source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh" if [ -z "$IP_ADDRESS" ]; then # in our scheme, the single IP address that all our domains map to. - IP_ADDRESS="10.28.42.20" + IP_ADDRESS="$(get_ip_addresses | head)" + echo "** defaulting IP address to $IP_ADDRESS" 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" + SERVER_ADMIN="$(logname).localhost" + echo "** defaulting server admin to $SERVER_ADMIN" 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" + MAIN_NAME_SERVER="ns.localhost" + echo "** defaulting main name server to $MAIN_NAME_SERVER" 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" + MAIL_SERVER="mail.localhost" + echo "** defaulting mail server to $MAIL_SERVER" fi if [ -z "$DISTRO" ]; then # the distribution name to be listed in info for the new domain or subdomain. DISTRO="ubuntu" + echo "** defaulting distro to $DISTRO" fi # main body of script. diff --git a/scripts/system/remove_domain.sh b/scripts/system/remove_domain.sh index 45bb487c..f1048b74 100644 --- a/scripts/system/remove_domain.sh +++ b/scripts/system/remove_domain.sh @@ -15,27 +15,6 @@ source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh" # some defaults that are convenient for current purposes. # existing values will be respected over our defaults. -#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 - # main body of script. if [[ $EUID != 0 ]]; then