X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsite_avenger%2Frevamp_cakelampvm.sh;h=9fff4c0fc3fe5584adb375e7529549cecf58b44e;hb=03eff8506f53db7e72630835a9a4d83ebd82c1dd;hp=9afd92140f3d0aa2f717a58b31ec31dde6ca4f72;hpb=5014baf97957923fc16403d4aa2614dd90d0f418;p=feisty_meow.git diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh index 9afd9214..9fff4c0f 100644 --- a/scripts/site_avenger/revamp_cakelampvm.sh +++ b/scripts/site_avenger/revamp_cakelampvm.sh @@ -20,6 +20,23 @@ 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 +fi + +############## + +sep + echo "Regenerating feisty meow loading dock." reconfigure_feisty_meow @@ -29,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." + echo "successfully added wildcard domains to the cakelampvm.com bind configuration." 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? +# why cripple a necessary feature by default? -search_replace a b -/etc/samba/smb.conf  -if [ $? -ne 0 ]; then - echo "the samba configuration has already been fixed for user homes, so that's fine." -else - restart_samba - echo successfully patched the samba configuration to enable writes on user home directories. super cool. -fi +sep + +pattern="[#;][[:blank:]]*read only = yes" +replacement="read only = no" + +# we just always do the replacement now, after realizing the sentinel pattern +# was acutally already in the file... too much subtlety can get one into trouble. +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. + +############## + +# add the latest version of the cakelampvm environment variables for apache. + +sep + +# drop existing file, if already configured. ignore errors. +a2disconf env_vars_cakelampvm &>/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 +test_or_die "copying environment variables file into place" + +# enable the new version of the config file. +a2enconf env_vars_cakelampvm +test_or_die "enabling the new cakelampvm environment config for apache" + +echo Successfully configured the apache2 environment variables needed for cakelampvm. ############## ############## # 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]*