X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsite_avenger%2Frevamp_cakelampvm.sh;h=37440de33c9d6dc27a0e105b9a803aa51184cc24;hb=85a5dae6b705a8179e82288e16310527157df7c1;hp=d966b69f558bae3ebb2194ce54097eb8dbd178df;hpb=b2d6b44040e07cb085727979e27286cf12275de1;p=feisty_meow.git diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh index d966b69f..37440de3 100644 --- a/scripts/site_avenger/revamp_cakelampvm.sh +++ b/scripts/site_avenger/revamp_cakelampvm.sh @@ -20,6 +20,18 @@ 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: " +read mysql_passwd +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 +41,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." +fi + +############## + +# fix samba configuration for (ass-headed) default of read-only in user homes. +# why cripple a necessary feature by default? + +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. + +sep -" regenerate test_or_die "regenerating feisty meow scripts" chown -R "$(logname)":"$(logname)" /home/$(logname)/.[a-zA-Z0-9]*