#!/bin/bash

#######################
# Remove SSL* settings from VirtualHost on install then leave alone on future 
# updates. Settings will be in apache-security.conf but if someone wants 
# to override those settings then they can do so in ssl.comnf after first install
#######################
if [ "$1" == "new" ]; then
    sed -i 's|^SSLProtocol\(.*\)|#SSLProtocol\1|g' /etc/httpd/conf.d/ssl.conf
    sed -i 's|^SSLCipherSuite\(.*\)|#SSLCipherSuite\1|g'  /etc/httpd/conf.d/ssl.conf
fi

#######################
# Get rid of default welcome page
#######################
if [ -f "/etc/httpd/conf.d/welcome.conf" ]; then
    mv -f /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.bak
fi