X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsite_avenger%2Frevamp_cakelampvm.sh;h=9fff4c0fc3fe5584adb375e7529549cecf58b44e;hb=03eff8506f53db7e72630835a9a4d83ebd82c1dd;hp=8bd5eeee411cc5237e60287310788415f2716083;hpb=898abb2e5b0149d72a63b186196a04e8ad4c62c6;p=feisty_meow.git diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh index 8bd5eeee..9fff4c0f 100644 --- a/scripts/site_avenger/revamp_cakelampvm.sh +++ b/scripts/site_avenger/revamp_cakelampvm.sh @@ -22,7 +22,12 @@ source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh" # new requirement is to get the sql root password, since we need to do some sql db configuration. echo -n "Please enter the MySQL root account password: " +# turn off echo but remember former setting. +stty_orig=`stty -g` +stty -echo read mysql_passwd +# turn echo back on. +stty $stty_orig if [ -z "$mysql_passwd" ]; then echo "This script must have the sql root password to proceed." exit 1 @@ -30,6 +35,8 @@ fi ############## +sep + echo "Regenerating feisty meow loading dock." reconfigure_feisty_meow @@ -39,6 +46,26 @@ test_or_die "fix after reconfigured as sudo" ############## +# set up some crucial users in the mysql db that we seem to have missed previously. + +sep + +echo "Adding users to the mysql database." + +mysql -u root -p"$mysql_passwd" <> /etc/bind/cakelampvm.com.conf - restart_bind - echo "successfully added wildcard domains to the cakelampvm.com bind configuration, so we're still on track for greatness." -fi -############## +;;;;;; -# fix samba configuration for (ass-headed) default of read-only in user homes. -# why add a necessary feature if you're just going to cripple it by default? -pattern="[#;][[:blank:]]*read only = yes" -replacement="read only = no" -# first see if we've already done this. -# if we find any occurrence of the replacement, we assume we already did it. -# ** we're assuming a lot about the structure of the samba config file! -grep -q "$replacement" /etc/samba/smb.conf  -if [ $? -ne 0 ]; then - echo "the samba configuration has already been fixed for user homes, s'cool." -else - # so not there yet; we need to make the replacement. - sed -i "0,/$pattern/{s/$pattern/$replacement/}" /etc/samba/smb.conf - test_or_die "patching samba configuration to enable write acccess on user home dirs" - # sweet, looks like that worked... - restart_samba - echo successfully patched the samba configuration to enable writes on user home directories. way cool. +" >> /etc/bind/cakelampvm.com.conf + restart_bind + echo "successfully added wildcard domains to the cakelampvm.com bind configuration." fi ############## -# set up some crucial users in the mysql db that we seem to have missed previously. +# fix samba configuration for (ass-headed) default of read-only in user homes. +# why cripple a necessary feature by default? -mysql -u root -p "$mysql_passwd" </dev/null # plug in the new version, just stomping anything there. # note: we only expect to have one version of the env_vars dir at a time in place in feisty... -cp -f $FEISTY_MEOW_APEX/production/sites/cakelampvm.com/rolling/env_vars.*/env_vars_cakelampvm.conf /etc/apache2/conf-available +\cp -f $FEISTY_MEOW_APEX/production/sites/cakelampvm.com/rolling/env_vars.*/env_vars_cakelampvm.conf /etc/apache2/conf-available test_or_die "copying environment variables file into place" # enable the new version of the config file. @@ -246,10 +272,8 @@ echo Successfully configured the apache2 environment variables needed for cakela # sequel--tell them they're great and show the hello again also. -echo " +sep - -" regenerate test_or_die "regenerating feisty meow scripts" chown -R "$(logname)":"$(logname)" /home/$(logname)/.[a-zA-Z0-9]*