Commit da437d7c838e79a2274ebcad6ec55e383f199b7e

Authored by Theoziran Lima
1 parent dda1400b
Exists in master and in 1 other branch issue488

Instalação de Wordpress com instalação já preexistente

@@ -9,11 +9,6 @@ VAGRANTFILE_API_VERSION = "2" @@ -9,11 +9,6 @@ VAGRANTFILE_API_VERSION = "2"
9 $firstTimeScript = <<SCRIPT 9 $firstTimeScript = <<SCRIPT
10 cd /vagrant 10 cd /vagrant
11 composer update 11 composer update
12 -cp config/wp-config-vagrant.php src/wp-config.php  
13 -cp config/htaccess-vagrant src/.htaccess  
14 -cp config/file-remote.php src/file-remote.php  
15 -cp config/index-vagrant.php src/index.php  
16 -rm -f src/wp/index.php  
17 npm install 12 npm install
18 ./node_modules/.bin/gulp 13 ./node_modules/.bin/gulp
19 apt-get install -y subversion 14 apt-get install -y subversion
@@ -28,10 +23,6 @@ bunzip2 db.sql.bz2 @@ -28,10 +23,6 @@ bunzip2 db.sql.bz2
28 mysql --user=root --password=root -h 127.0.0.1 participacao < /vagrant/db/db.sql 23 mysql --user=root --password=root -h 127.0.0.1 participacao < /vagrant/db/db.sql
29 bzip2 -9 db.sql 24 bzip2 -9 db.sql
30 25
31 -cd /vagrant/src  
32 -ln -s wp/wp-admin wp-admin  
33 -ln -s wp/wp-includes wp-includes  
34 -  
35 SCRIPT 26 SCRIPT
36 27
37 $updateServices = <<SCRIPT 28 $updateServices = <<SCRIPT
@@ -68,5 +68,11 @@ @@ -68,5 +68,11 @@
68 "src/wp-content/mu-plugins/{$name}/": ["type:wordpress-muplugin"], 68 "src/wp-content/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
69 "src/wp-content/themes/{$name}/": ["type:wordpress-theme"] 69 "src/wp-content/themes/{$name}/": ["type:wordpress-theme"]
70 } 70 }
  71 + },
  72 + "scripts": {
  73 + "pre-install-cmd": "/bin/bash ./pre-update.sh",
  74 + "pre-update-cmd": "/bin/bash ./pre-update.sh",
  75 + "post-update-cmd": "/bin/bash ./post-update.sh",
  76 + "post-update-cmd": "/bin/bash ./post-update.sh"
71 } 77 }
72 -} 78 -}
  79 +}
73 \ No newline at end of file 80 \ No newline at end of file
post-update.sh 0 → 100644
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
  1 +cp config/wp-config-vagrant.php src/wp-config.php
  2 +cp config/htaccess-vagrant src/.htaccess
  3 +cp config/file-remote.php src/file-remote.php
  4 +cp config/index-vagrant.php src/index.php
  5 +rm -f src/wp/index.php
  6 +ln -s wp/wp-admin src/wp-admin
  7 +ln -s wp/wp-includes src/wp-includes
0 \ No newline at end of file 8 \ No newline at end of file
pre-update.sh 0 → 100755
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
  1 +#!/usr/bin/env bash
  2 +rm -rf src/wp-admin src/wp-includes src/*.php src/.htaccess
0 \ No newline at end of file 3 \ No newline at end of file