diff --git a/contrib/install-hudson.sh b/contrib/install-hudson.sh index ec2fe95..3242fb5 100755 --- a/contrib/install-hudson.sh +++ b/contrib/install-hudson.sh @@ -1,6 +1,6 @@ #!/bin/bash -# ################################################################################ Hudson +#======================================| Hudson # README: # diff --git a/contrib/install-memcached.sh b/contrib/install-memcached.sh index 7923bce..5a6654b 100755 --- a/contrib/install-memcached.sh +++ b/contrib/install-memcached.sh @@ -1,6 +1,6 @@ #!/bin/bash -# ################################################################################ memcached +#======================================| memcached # README: # diff --git a/contrib/install-pareview.sh b/contrib/install-pareview.sh index b8904cc..c57a55c 100755 --- a/contrib/install-pareview.sh +++ b/contrib/install-pareview.sh @@ -4,7 +4,7 @@ CWD="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "${CWD}"/CONFIG if [[ ${DEBUG} == true ]]; then set -x -v; fi -# ################################################################################ PAReview.sh +#======================================| PAReview.sh # README: # diff --git a/contrib/install-solr.sh b/contrib/install-solr.sh index 0849229..7575310 100755 --- a/contrib/install-solr.sh +++ b/contrib/install-solr.sh @@ -1,6 +1,6 @@ #!/bin/bash -# ################################################################################ Apache SOLR - 183mb +#======================================| Apache SOLR - 183mb # README: # diff --git a/contrib/install-squid.sh b/contrib/install-squid.sh index 792b303..42ce68b 100755 --- a/contrib/install-squid.sh +++ b/contrib/install-squid.sh @@ -1,6 +1,6 @@ #!/bin/bash -# ################################################################################ Squid caching of ftp.drupal.org +#======================================| Squid caching of ftp.drupal.org # README: # # This script will install Squid for caching of ftp.drupal.org diff --git a/setup_scripts/1-prep.sh b/setup_scripts/1-prep.sh index c850c17..19daaa7 100755 --- a/setup_scripts/1-prep.sh +++ b/setup_scripts/1-prep.sh @@ -1,18 +1,29 @@ #!/bin/bash set -e +#======================================| +# +# THIS SCRIPT SETS UP ENVIRONMENT +# +# * Figure out environment +# * Update Zenity (due to bug in initial release of 12.04) +# * User: What Type of Install? (Abort / Virtual Kernel / Standard Kernel) +# * Setup: $USER in sudoers and root group +# * Add: wget, git, and curl -- which are used by installation scripts +# +#======================================| -# ################################################################################ Import Variables +#======================================| Import Variables # Make sure you have edited this file source "${HOME}/${DDD}/setup_scripts/CONFIG" if [[ ${DEBUG} == true ]]; then set -x -v; fi -# ################################################################################ Update Zenity (12.04 from debian has a bug) +c Update Zenity (12.04 has a bug) sudo apt-get install zenity -# ################################################################################ -# Prompt to give user a chance to abort to avoid accidentally borking their system -# ################################################################################ +################################################################################ +# Prompt for installation type or to abort (to avoid borking system) +################################################################################ INSTALLTYPE=$(zenity \ --list \ --radiolist \ @@ -41,8 +52,8 @@ if [ "$UserAbort" -ne 0 ]; then # if cancel button(1), choose abort(3), or timeo exit $UserAbort; fi -# ok, lets do it -# SAVE INSTALLATION TYPE +#======================================| ok, lets do it +#======================================| SAVE INSTALLATION TYPE echo " # ################## START_USER_CONFIG INSTALLTYPE=${INSTALLTYPE}" >> "${HOME}/${DDD}/setup_scripts/CONFIG" @@ -56,7 +67,7 @@ Towards the end, the process requires some manual steps, guided by popups like t echo "${USER} ALL=(ALL) NOPASSWD: ALL" | sudo tee -a "/etc/sudoers.d/${DDD}" > /dev/null sudo chmod 440 "/etc/sudoers.d/${DDD}" -# ################################################################################ Install/Update some basics +#======================================| Install/Update some basics sudo apt-get "${APTGET_VERBOSE}" install git wget curl # Add current user to root 'group' to make it easier to edit config files diff --git a/setup_scripts/1a-vbox-guest-additions.sh b/setup_scripts/1a-vbox-guest-additions.sh index 3104456..070e727 100755 --- a/setup_scripts/1a-vbox-guest-additions.sh +++ b/setup_scripts/1a-vbox-guest-additions.sh @@ -1,12 +1,12 @@ #!/bin/bash set -e -# ################################################################################ Import Variables +#======================================| Import Variables # Make sure you have edited this file source "${HOME}/${DDD}/setup_scripts/CONFIG" if [[ ${DEBUG} == true ]]; then set -x -v; fi -# ################################################################################ SETUP KERNEL +#======================================| SETUP KERNEL if [ "${INSTALLTYPE}" == "virtual" ] then # Remove the standard Kernel and install virtual kernel. diff --git a/setup_scripts/2-slim.sh b/setup_scripts/2-slim.sh index f27ee71..4c8fa70 100755 --- a/setup_scripts/2-slim.sh +++ b/setup_scripts/2-slim.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -# ################################################################################ Import Variables +#======================================| Import Variables # Make sure you have edited this file source "${HOME}/${DDD}/setup_scripts/CONFIG" if [[ ${DEBUG} == true ]]; then set -x -v; fi diff --git a/setup_scripts/2a-update.sh b/setup_scripts/2a-update.sh index 0580f31..9f73791 100755 --- a/setup_scripts/2a-update.sh +++ b/setup_scripts/2a-update.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -# ################################################################################ Import Variables +#======================================| Import Variables # Make sure you have edited this file source "${HOME}/${DDD}/setup_scripts/CONFIG" if [[ ${DEBUG} == true ]]; then set -x -v; fi diff --git a/setup_scripts/3-lamp.sh b/setup_scripts/3-lamp.sh index b751141..4ee280d 100755 --- a/setup_scripts/3-lamp.sh +++ b/setup_scripts/3-lamp.sh @@ -1,18 +1,18 @@ #!/bin/bash set -e -# ################################################################################ Import Variables +#======================================| Import Variables # Make sure you have edited this file source "${HOME}/${DDD}/setup_scripts/CONFIG" if [[ ${DEBUG} == true ]]; then set -x -v; fi -# ################################################################################ Drupal sites +#======================================| Drupal sites # Create folder for websites to live in mkdir -p "${WWW_ROOT}" sudo chown :www-data "${WWW_ROOT}" sudo chmod -R u=rwX,g=rX,o= "${WWW_ROOT}" -# ################################################################################ Install LAMP packages +#======================================| Install LAMP packages # Define package names, and debconf config values. Keep package names in sync. LAMP_APACHE="libapache2-mod-php5 php-pear" LAMP_MYSQL="mysql-server libmysqlclient18 mysql-common" @@ -81,13 +81,13 @@ echo " sudo a2ensite default-ssl -# ################################################################################ Configure MYSQL +#======================================| Configure MYSQL sudo sed -i 's/#log_slow_queries/log_slow_queries/g' /etc/mysql/my.cnf sudo sed -i 's/#long_query_time/long_query_time/g' /etc/mysql/my.cnf -# ################################################################################ Configure PHP +#======================================| Configure PHP # FIXME haven't checked for unnecessary code since 9.10 # sudo sed -i 's/find_this/replace_with_this/g' infile1 infile2 etc sudo sed -i 's/magic_quotes_gpc = On/magic_quotes_gpc = Off/g' /etc/php5/apache2/php.ini /etc/php5/cli/php.ini @@ -112,7 +112,7 @@ echo "extension=uploadprogress.so" | sudo tee /etc/php5/apache2/conf.d/uploadpro -# ################################################################################ Log Files +#======================================| Log Files mkdir -p "${LOGS}" @@ -138,7 +138,7 @@ ln -s /var/log/mysql/mysql-slow.log "${LOGS}/mysql-slow.log -# ################################################################################ Config Files +#======================================| Config Files mkdir -p "${CONFIGS}" sudo chmod -R g+w /etc/apache2 ln -s /etc/apache2/apache2.conf "${CONFIGS}/apache2.conf" @@ -163,7 +163,7 @@ ll This will list the files and where they link to." > "${CONFIGS}/README.txt" -# ################################################################################ user management +#======================================| user management # Make user of group www-data sudo adduser $USER www-data diff --git a/setup_scripts/4-ides.sh b/setup_scripts/4-ides.sh index 2106112..db20318 100755 --- a/setup_scripts/4-ides.sh +++ b/setup_scripts/4-ides.sh @@ -1,20 +1,20 @@ #!/bin/bash set -e -# ################################################################################ Import Variables +#======================================| Import Variables # Make sure you have edited this file source "${HOME}/${DDD}/setup_scripts/CONFIG" if [[ ${DEBUG} == true ]]; then set -x -v; fi -# ################################################################################ JRE +#======================================| JRE # REQUIREMENT for Netbeans or Eclipse if [[ "${INSTALL_NETBEANS}" == true ]] || [[ "${INSTALL_ECLIPSE}" == true ]] || [[ "${INSTALL_JRE}" == true ]]; then ## Install java - 100mb sudo apt-get "${APTGET_VERBOSE}" install default-jre fi -# ################################################################################ Lightweight Editors -# ################################################################################ GEDIT +#======================================| Lightweight Editors +#======================================| GEDIT if [[ "${INSTALL_GEDIT}" == true ]]; then sudo apt-get "${APTGET_VERBOSE}" install gedit-plugins @@ -30,7 +30,7 @@ if [[ "${INSTALL_GEDIT}" == true ]]; then gconftool-2 -s /apps/gedit-2/preferences/editor/save/auto_save --type=bool true fi -# ################################################################################ GEANY +#======================================| GEANY # INSTALL GEANY & SETUP FOR DRUPAL / WEB DEVELOPMENT # Geany is a small fast IDE (based on scintilla ... also what notepad++ is also built on) # info: http://en.wikipedia.org/wiki/Geany @@ -52,7 +52,7 @@ if [[ "${INSTALL_GEANY}" == true ]]; then wget "${WGET_VERBOSE}" -O ${HOME}/.config/geany/tags/geany-tags-css --referer="${REFERER}" --user-agent="${USERAGENT}" --header="${HEAD1}" --header="${HEAD2}" --header="${HEAD3}" --header="${HEAD4}" --header="${HEAD5}" "${GEANY_CSS}" fi -# ################################################################################ ECLIPSE +#======================================| ECLIPSE if [[ "${INSTALL_ECLIPSE}" == true ]]; then wget "${WGET_VERBOSE}" -O eclipse.tar.gz --referer="${REFERER}" --user-agent="${USERAGENT}" --header="${HEAD1}" --header="${HEAD2}" --header="${HEAD3}" --header="${HEAD4}" --header="${HEAD5}" "${ECLIPSE_URL}" cd @@ -65,7 +65,7 @@ if [[ "${INSTALL_ECLIPSE}" == true ]]; then sudo cp ${HOME}/eclipse-php/configuration/org.eclipse.osgi/bundles/224/1/.cp/icons/eclipse48.png /usr/share/pixmaps/eclipse.png fi -# ################################################################################ NETBEANS +#======================================| NETBEANS if [[ "${INSTALL_NETBEANS}" == true ]]; then cd wget "${WGET_VERBOSE}" -O netbeans.sh --referer="${REFERER}" --user-agent="${USERAGENT}" --header="${HEAD1}" --header="${HEAD2}" --header="${HEAD3}" --header="${HEAD4}" --header="${HEAD5}" "${NETBEANS_URL}" diff --git a/setup_scripts/7-config.sh b/setup_scripts/7-config.sh index 8d2ebd2..ccc359f 100755 --- a/setup_scripts/7-config.sh +++ b/setup_scripts/7-config.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -# ################################################################################ Import Variables +#======================================| Import Variables # Make sure you have edited this file source "${HOME}/${DDD}/setup_scripts/CONFIG" if [[ ${DEBUG} == true ]]; then set -x -v; fi @@ -40,20 +40,20 @@ APT::Periodic::Unattended-Upgrade \"1\"; " | sudo tee /etc/apt/apt.conf.d/10periodic > /dev/null -# ################################################################################ Replace localhost/index.html +#======================================| Replace localhost/index.html # Add interesting default document for localhost sudo rm /var/www/index.html sudo cp ${HOME}/${DDD}/config/index.php /var/www/index.php sudo chmod -R u=rwX,g=rX,o= /var/www sudo chown -R $USER:www-data /var/www -# ################################################################################ Command line shortcuts (bash aliases) +#======================================| Command line shortcuts (bash aliases) # Don't sudo here... cat ${HOME}/${DDD}/config/ddd_bash_aliases >> ${HOME}/.bash_aliases -# ################################################################################ Desktop shortcuts +#======================================| Desktop shortcuts cat > ${HOME}/Desktop/README.desktop < ${HOME}/websites/README.txt -# ################################################################################ Drush +#======================================| Drush # Install drush git clone http://git.drupal.org/project/drush.git @@ -78,7 +78,7 @@ ln -s ${HOME}/${DDD}/make_templates/*.make "${WWW_ROOT}" git clone --recursive --branch ${FEATHER} http://git.drupal.org/project/feather.git ${HOME}/.drush/feather -# ################################################################################ Email catcher +#======================================| Email catcher if [[ "${INSTALL_EMAIL_CATCHER}" == true ]]; then # Configure email collector mkdir -p "${LOGS}/mail" @@ -88,7 +88,7 @@ if [[ "${INSTALL_EMAIL_CATCHER}" == true ]]; then fi -# ################################################################################ XDebug Debugger/Profiler +#======================================| XDebug Debugger/Profiler # Configure xdebug - installed 2.1 from apt if [[ "${INSTALL_XDEBUG}" == true ]]; then echo " @@ -102,7 +102,7 @@ if [[ "${INSTALL_XDEBUG}" == true ]]; then " | sudo tee -a /etc/php5/conf.d/xdebug.ini > /dev/null - # ################################################################################ Install a web-based profile viewer + #======================================| Install a web-based profile viewer if [[ "${INSTALL_WEBGRIND}" == true ]]; then mkdir -p "${LOGS}/profiler" cd "${LOGS}/profiler" @@ -123,7 +123,7 @@ if [[ "${INSTALL_XDEBUG}" == true ]]; then fi # WEBGRIND fi # XDEBUG -# ################################################################################ XHProf profiler (Devel Module) +#======================================| XHProf profiler (Devel Module) # Adapted from: http://techportal.ibuildings.com/2009/12/01/profiling-with-xhprof/ if [[ "${INSTALL_XHPROF}" == true ]]; then @@ -163,6 +163,6 @@ if [[ "${INSTALL_XHPROF}" == true ]]; then chmod -R ug=rwX,o= "${LOGS}/xhprof" fi -# ################################################################################ Restart apache +#======================================| Restart apache sudo /etc/init.d/apache2 restart #use sysvinit scripts instead of upstart for more compatibility (debian, older ubuntu, etc) diff --git a/setup_scripts/extras_misc.sh b/setup_scripts/extras_misc.sh index a2fea5f..265222e 100755 --- a/setup_scripts/extras_misc.sh +++ b/setup_scripts/extras_misc.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -# ################################################################################ Import Variables +#======================================| Import Variables # Make sure you have edited this file source "${HOME}/${DDD}/setup_scripts/CONFIG" if [[ ${DEBUG} == true ]]; then set -x -v; fi @@ -57,7 +57,7 @@ gsettings set org.gnome.desktop.background color-shading-type 'horizontal' # to monitor changes, use this: gsettings monitor org.gnome.desktop.background -# ################################################################################ FIREFOX +#======================================| FIREFOX # Install flash-plugin browser sudo apt-get "${APTGET_VERBOSE}" install flashplugin-installer # Download FEBE backup file diff --git a/setup_scripts/extras_theming.sh b/setup_scripts/extras_theming.sh index 1092b14..6514227 100755 --- a/setup_scripts/extras_theming.sh +++ b/setup_scripts/extras_theming.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -# ################################################################################ Import Variables +#======================================| Import Variables # Make sure you have edited this file source "${HOME}/${DDD}/setup_scripts/CONFIG" if [[ ${DEBUG} == true ]]; then set -x -v; fi diff --git a/setup_scripts/install.sh b/setup_scripts/install.sh index ec3416c..2f7a471 100755 --- a/setup_scripts/install.sh +++ b/setup_scripts/install.sh @@ -10,14 +10,14 @@ set -e # -# ################################################################################ Import Variables +#======================================| Import Variables # Make sure you have edited this file # CWD based on http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in CWD="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" source "${CWD}"/CONFIG if [[ ${DEBUG} == true ]]; then set -x -v; fi -# ################################################################################ Error Checking +#======================================| Error Checking function check_errs() { # Parameter 1 is the return code # Parameter 2 is text to display on failure. @@ -30,7 +30,7 @@ function check_errs() { fi } -# ################################################################################ Reboot functions +#======================================| Reboot functions function reboot { # update .profile file to continue the next step of the script. echo "gnome-terminal -x bash -c \"${HOME}/${DDD}/setup_scripts/install.sh $1\" &" >> ${HOME}/.profile @@ -54,7 +54,7 @@ if [ -n "$1" ] ; then # sleep if rebooted sed -i 's/gnome-terminal -x bash -c/# deleteme /g' ${HOME}/.profile fi -# ################################################################################ Test for network +#======================================| Test for network # if rebooting, short delay for environment to setup # @FIXME: better to test, but this is poormans solution for now if [ ! -z $1 ]; then sleep 5; fi @@ -76,10 +76,9 @@ done -# ################################################################################ Install it! -# this switch statement handles reboots. +#======================================| Install it! +# This case statment handles reboots cd - case "$1" in "") ${HOME}/${DDD}/setup_scripts/1-prep.sh 2>&1 | tee -a ${HOME}/${DDD}/setup_scripts/logs/install.log diff --git a/setup_scripts/update.sh b/setup_scripts/update.sh index 952a31f..4d2222f 100755 --- a/setup_scripts/update.sh +++ b/setup_scripts/update.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -# ################################################################################ Import Variables +#======================================| Import Variables # Make sure you have edited this file source "${HOME}/${DDD}/setup_scripts/CONFIG" if [[ ${DEBUG} == true ]]; then set -x -v; fi diff --git a/setup_scripts/updates.inc b/setup_scripts/updates.inc index 0db36a9..c57fb77 100755 --- a/setup_scripts/updates.inc +++ b/setup_scripts/updates.inc @@ -1,7 +1,7 @@ #!/bin/bash set -e -# ################################################################################ Import Variables +#======================================| Import Variables # Make sure you have edited this file source "${HOME}/${DDD}/setup_scripts/CONFIG" if [[ ${DEBUG} == true ]]; then set -x -v; fi