Skip to content

Commit 02f1a66

Browse files
committed
Update script to use new backup command format
1 parent ab7c0f8 commit 02f1a66

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scripts/create-local.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22
SITENAME=${1:?"You must enter the name of the site you want to install."}
33
TERMINUS='php /home/vagrant/cli/php/boot-fs.php'
4-
LOCAL_DIR="/srv/www/drupal/$1"; #should be an empty dir
5-
DB_NAME="pantheon_$( echo $1 | sed -r 's/-//')"
6-
DBUSER="$( echo $1 | sed -r 's/-//')"
7-
DBPASS="$( echo $1 | sed -r 's/-//')"
4+
LOCAL_DIR="/srv/www/$1"; #should be an empty dir
5+
DB_NAME="pantheon_$( echo $1 | sed -r 's/-//g')"
6+
DBUSER="$( echo $1 | sed -r 's/-//g')"
7+
DBPASS="$( echo $1 | sed -r 's/-//g')"
88
SITE_ID=$( $TERMINUS site info --site=$SITENAME --bash --nocache=1 | grep id | awk '{print $2}' )
99
GIT_REMOTE="ssh://codeserver.dev.$SITE_ID@codeserver.dev.$SITE_ID.drush.in:2222/~/repository.git"
1010
echo "GIT_REMOTE=$GIT_REMOTE"
@@ -15,8 +15,8 @@ fi
1515

1616
cd $LOCAL_DIR
1717

18-
$TERMINUS site get-backup --site=$SITENAME --element=files --env='dev' --to-directory=$LOCAL_DIR || exit 1
19-
$TERMINUS site get-backup --site=$SITENAME --element=database --env='dev' --to-directory=$LOCAL_DIR || exit 1
18+
$TERMINUS site backup get --site=$SITENAME --element=files --env='dev' --to-directory=$LOCAL_DIR || exit 1
19+
$TERMINUS site backup get --site=$SITENAME --element=database --env='dev' --to-directory=$LOCAL_DIR || exit 1
2020

2121
DB=$( ls . | grep "database.*gz" )
2222
FILES=$( ls . | grep "files.*gz" )
@@ -87,7 +87,7 @@ if [ -f /etc/nginx/nginx-$framework-common.conf ]; then
8787
listen 80;
8888
listen 443 ssl;
8989
server_name local.$SITENAME.dev;
90-
root /srv/www/drupal/$SITENAME/code;
90+
root /srv/www/$SITENAME/code;
9191
include /etc/nginx/nginx-$framework-common.conf;
9292
}' > /etc/nginx/custom-sites/$SITENAME.conf"
9393

0 commit comments

Comments
 (0)