diff --git a/scripts/create-local.sh b/scripts/create-local.sh index 5d823694e..b1fd4c557 100755 --- a/scripts/create-local.sh +++ b/scripts/create-local.sh @@ -1,10 +1,10 @@ #!/bin/bash SITENAME=${1:?"You must enter the name of the site you want to install."} TERMINUS='php /home/vagrant/cli/php/boot-fs.php' -LOCAL_DIR="/srv/www/drupal/$1"; #should be an empty dir -DB_NAME="pantheon_$( echo $1 | sed -r 's/-//')" -DBUSER="$( echo $1 | sed -r 's/-//')" -DBPASS="$( echo $1 | sed -r 's/-//')" +LOCAL_DIR="/srv/www/$1"; #should be an empty dir +DB_NAME="pantheon_$( echo $1 | sed -r 's/-//g')" +DBUSER="$( echo $1 | sed -r 's/-//g')" +DBPASS="$( echo $1 | sed -r 's/-//g')" SITE_ID=$( $TERMINUS site info --site=$SITENAME --bash --nocache=1 | grep id | awk '{print $2}' ) GIT_REMOTE="ssh://codeserver.dev.$SITE_ID@codeserver.dev.$SITE_ID.drush.in:2222/~/repository.git" echo "GIT_REMOTE=$GIT_REMOTE" @@ -15,8 +15,8 @@ fi cd $LOCAL_DIR -$TERMINUS site get-backup --site=$SITENAME --element=files --env='dev' --to-directory=$LOCAL_DIR || exit 1 -$TERMINUS site get-backup --site=$SITENAME --element=database --env='dev' --to-directory=$LOCAL_DIR || exit 1 +$TERMINUS site backup get --site=$SITENAME --element=files --env='dev' --to-directory=$LOCAL_DIR || exit 1 +$TERMINUS site backup get --site=$SITENAME --element=database --env='dev' --to-directory=$LOCAL_DIR || exit 1 DB=$( ls . | grep "database.*gz" ) FILES=$( ls . | grep "files.*gz" ) @@ -87,7 +87,7 @@ if [ -f /etc/nginx/nginx-$framework-common.conf ]; then listen 80; listen 443 ssl; server_name local.$SITENAME.dev; - root /srv/www/drupal/$SITENAME/code; + root /srv/www/$SITENAME/code; include /etc/nginx/nginx-$framework-common.conf; }' > /etc/nginx/custom-sites/$SITENAME.conf"