Skip to content

Instantly share code, notes, and snippets.

@cfalzone
Created October 28, 2014 18:17
Show Gist options
  • Save cfalzone/c84d7a5d226df86e4708 to your computer and use it in GitHub Desktop.
Save cfalzone/c84d7a5d226df86e4708 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Figure out who our dev server is
export DB_HOST=`hostname | perl -pe 's/app/db/g'`
echo "DB Host is - ${DB_HOST}"
export DB_PORT=5444
# DotCMS Paths
export DOTCMS_BASE=/data/wwwroot/dotcms
export DOTCMS_HOME=$DOTCMS_BASE/current
# Clone the osgiplugins repo
cd $DOTCMS_BASE
git clone git@github.com:/aquent/osgiplugins.git
# Deploy the jars and exports
cp osgiplugins/jars/*.jar $DOTCMS_HOME/dotCMS/WEB-INF/felix/load/.
# Get rid of dotCMS's config plugins and Clone the config plugin
cd $DOTCMS_HOME/plugins
rm -rf com.dotcms.config
git clone git@github.com:/aquent/com.aquent.config.git
# Change the Hostname and Port in the ROOT File
perl -pi -e "s/\{DB_HOST\}/${DB_HOST}/g" $DOTCMS_HOME/plugins/com.aquent.config/ROOT/tomcat/conf/Catalina/localhost/ROOT.xml
perl -pi -e "s/\{DB_PORT\}/${DB_PORT}/g" $DOTCMS_HOME/plugins/com.aquent.config/ROOT/tomcat/conf/Catalina/localhost/ROOT.xml
# Deploy and startup
cd $DOTCMS_HOME
ant clean deploy-no-jsp deploy-plugins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment