This repository has been archived by the owner on Aug 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
113 lines (94 loc) · 2.62 KB
/
install.sh
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
installdir="/Volumes/D/www/jeoga"
dbhost="localhost"
dbname="jeoga_website_db"
dbuser="root"
dbpass=
url="http://localhost/jeoga_website"
title="Jeoga"
admin_user="jeoga"
admin_pass="1234"
admin_email="admin@jeoga.com"
git_origin="git@github.com:jeoga/jeoga_website.git"
mkdir -p $installdir
cd $installdir;
function press_enter
{
echo ""
echo -n "Press Enter to continue"
read
clear
}
function download
{
rm -rf *;
rm -rf .gitignore;
rm -rf .git
wp core download;
mkdir wp-content/uploads
chmod 775 wp-content/uploads
curl -O http://jeoga.com/.gitignore;
git init;
git remote add origin $git_origin
git add -A;
git commit -m "Wordpress Installed";
}
function config
{
wp core config --dbhost=$dbhost --dbname=$dbname --dbuser=$dbuser --dbpass=
}
function install
{
wp core install --url="$url" --title="$title" --admin_user="$admin_user" --admin_password="$admin_pass" --admin_email="$admin_email"
}
function createUsers
{
wp user create manager manager@jeoga.com --role=administrator --user_pass=1234
wp user create developer developer@jeoga.com --role=administrator --user_pass=1234
}
function installUsualPlugins
{
wp plugin install redux-framework --activate
wp plugin install timber-library --activate
wp plugin install meta-box --activate
wp plugin install wordpress-seo --activate
wp plugin install contact-form-7 --activate
wp plugin install bwp-minify
wp plugin install wordfence
wp plugin install https://github.com/rilwis/meta-box/archive/4.10.4.zip --activate
git add -A;
git commit -m "Usual Plugins Installed";
}
function installTheme
{
wp theme install http://s3.amazonaws.com/bucketname/my-theme.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef
git add -A;
git commit -m "Theme Boilerplate Installed";
}
selection=
until [ "$selection" = "0" ]; do
echo ""
echo "PROGRAM MENU"
echo "1 - Download Wordpress"
echo "2 - Create Database Setting"
echo "3 - Install Wordpress"
echo "4 - Create Users"
echo "5 - Install Usual Plugins"
echo "6 - Install Theme Boilerplate"
echo ""
echo "0 - exit program"
echo ""
echo -n "Enter selection: "
read selection
echo ""
case $selection in
1 ) download ; press_enter ;;
2 ) config ; press_enter ;;
3 ) install ; press_enter ;;
4 ) createUsers ; press_enter ;;
5 ) installUsualPlugins ; press_enter ;;
6 ) installTheme ; press_enter ;;
7 ) createCookies ; press_enter ;;
0 ) exit ;;
* ) echo "Please enter 1, 2, or 0"; press_enter
esac
done