X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsite_avenger%2Frevamp_cakelampvm.sh;h=a9016d8c5af158567714c54f17415e79ffac5100;hb=190b8abf3f0c3ad799d8eedc30c52fb5b6e8ad39;hp=b1757c44ac1cb73574d4639613978c6417615027;hpb=530111bfe206ae984b64c1e9a9ccb8559c7aeca8;p=feisty_meow.git diff --git a/scripts/site_avenger/revamp_cakelampvm.sh b/scripts/site_avenger/revamp_cakelampvm.sh index b1757c44..a9016d8c 100644 --- a/scripts/site_avenger/revamp_cakelampvm.sh +++ b/scripts/site_avenger/revamp_cakelampvm.sh @@ -137,7 +137,7 @@ fi ############## # fix up the apache site so that HSTS is disabled. otherwise we can't view -# https site once the domain name switch has occurred. +# the https site for cakelampvm.com once the domain name switch has occurred. # we operate only on our own specialized tls conf file. hopefully no one has messed with it besides revamp. # note the use of the character class :blank: below to match spaces or tabs. @@ -145,8 +145,8 @@ search_replace "^[[:blank:]]*Header always set Strict-Transport-Security.*" "# n if [ $? -ne 0 ]; then echo the apache tls-enabling.conf file seems to have already been patched to disable strict transport security. good. else - echo successfully patched the apache tls-enabling.conf file to disable strict transport security. awesome. restart_apache + echo successfully patched the apache tls-enabling.conf file to disable strict transport security. awesome. fi ############## @@ -167,14 +167,32 @@ else * IN A 10.28.42.20 IN HINFO "linux vm" "ubuntu" " >> /etc/bind/cakelampvm.com.conf - -restart_bind + 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. +fi ############## ##############