forked from digitalquery/wp-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
executable file
·47 lines (32 loc) · 1.14 KB
/
Copy pathbootstrap.sh
File metadata and controls
executable file
·47 lines (32 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
#
# load settings file
#
. /vagrant/wp-vagrant/settings.sh
debconf-set-selections <<< "mysql-server-5.5 mysql-server/root_password password $mysql_root_password"
debconf-set-selections <<< "mysql-server-5.5 mysql-server/root_password_again password $mysql_root_password"
# default packages (php, mysql, nginx, etc), are preinstalled in the base boxs
echo "**** add byobu config"
. /vagrant/wp-vagrant/configs/byobu.sh
echo "**** Moving nginx config files into place…"
. /vagrant/wp-vagrant/nginx/nginx.sh
echo "**** mysql config…"
mv /etc/mysql/my.cnf /etc/mysql/my.cnf.default
cp /vagrant/wp-vagrant/mysql/my.cnf /etc/mysql/my.cnf
echo "**** Set PHP to ${php_version} and copy config files"
. /vagrant/wp-vagrant/php/php.sh
echo "Starting services…"
service nginx restart
service php5.5-fpm stop
service php5.6-fpm stop
service php7.0-fpm stop
service php${php_version}-fpm restart
service mysql restart
# WP-CLI
. /vagrant/wp-vagrant/wp/wp-cli.sh
# Create database
. /vagrant/wp-vagrant/mysql/create_database.sh
# Install WP
. /vagrant/wp-vagrant/wp/install-wp.sh
# Import database
. /vagrant/wp-vagrant/mysql/import_database.sh