Last active
July 28, 2017 14:45
-
-
Save doostinharrell/5e1db57613e8a813f0d0 to your computer and use it in GitHub Desktop.
drupal.sh - Drupal installation script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#to run this command type: sh install.sh sitename | |
if [ -e $1 ]; | |
then | |
echo "ERROR: please supply site name ie: thewiredmouse" | |
exit 1 | |
fi | |
sudo echo "Configuring Drupal" | |
PARENT=$(basename $(pwd)) | |
#download drupal | |
drush dl drupal | |
sleep 10 | |
#rename drupal directory | |
mv {drupal*/*,drupal*/.*} ./ | |
rm -Rf drupal* | |
#install drupal modules | |
drush site-install standard --db-url=mysql://root:zxsw21@localhost/$1 --site-name=www.$1.com --account-name=twmadmin --account-pass="/.,lp-=#@!" [email protected] -y | |
drush dl views webform imce wysiwyg imce_wysiwyg pathauto site_map link xmlsitemap omega module_filter link_css admin_views adminimal_theme adminimal_admin_menu cs_adaptive_image devel extlink field_group weight -y | |
drush en adminimal views_ui webform imce wysiwyg imce_wysiwyg pathauto site_map link xmlsitemap omega module_filter php syslog statistics link_css admin_views adminimal_admin_menu cs_adaptive_image devel extlink field_group weight -y | |
drush dis bartik omega seven overlay color comment help search -y | |
#create subtheme | |
drush omega-subtheme $1 | |
drush en $1 -y | |
drush vset theme_default $1 -y | |
drush vset admin_theme adminimal -y | |
#update .htaccess files for local development | |
find /home/$1/public_html -name ".htaccess" -type f -exec sed -i 's/FollowSymLinks/SymLinksIfOwnerMatch/g' {} ";" | |
sudo echo "Drupal configuration complete" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment