Skip to content

Commit ce61866

Browse files
author
enoch85
committed
ready for release!
1 parent 890c30f commit ce61866

File tree

4 files changed

+16
-17
lines changed

4 files changed

+16
-17
lines changed

instruction.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ cat << WELCOME
1010
| This WordPress appliance comes with PHP 7 and Redis Cache, |
1111
| for best performance. The site(s) load very fast! |
1212
| |
13+
| In order to configure everything you have to run the setup script |
1314
| To run the setup script, just type: wordpress |
1415
| |
1516
| If you have any questions please email me: [email protected] |

phpmyadmin_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PHPMYADMINDIR=$INSTALLDIR/phpmyadmin
99
WANIP=$(dig +short myip.opendns.com @resolver1.opendns.com)
1010
ADDRESS=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1')
1111
PHPMYADMIN_CONF="/etc/apache2/conf-available/phpmyadmin.conf"
12-
BLOWFISH=$(cat /dev/urandom | tr -dc "a-zA-Z0-9" | fold -w 25 | head -1)
12+
BLOWFISH=$(cat /dev/urandom | tr -dc "a-zA-Z0-9" | fold -w 30 | head -1)
1313
UPLOADPATH=""
1414
SAVEPATH=""
1515

wordpress-startup-script.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ ifup $IFACE
187187
sleep 2
188188
echo
189189
echo "Testing if network is OK..."
190-
sleep 1
191190
echo
192191
bash $SCRIPTS/test_connection.sh
193192
sleep 2
@@ -206,8 +205,6 @@ ifup $IFACE
206205
sleep 2
207206
echo
208207
bash $SCRIPTS/test_connection.sh
209-
sleep 2
210-
clear
211208

212209
# Update WP SiteURL
213210
grep "address" /etc/network/interfaces > ip.txt
@@ -216,6 +213,8 @@ NEWADDRESS=$(grep "." ip.txt)
216213
echo "http://$NEWADDRESS/wordpress" > ip.txt
217214
wp option update siteurl < ip.txt --allow-root --path=$WPATH
218215
rm ip.txt
216+
sleep 2
217+
clear
219218

220219
# Change password
221220
echo -e "\e[0m"

wordpress_install.sh

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ apt-get install -y \
137137
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
138138
chmod +x wp-cli.phar
139139
mv wp-cli.phar /usr/local/bin/wp
140+
141+
# Create wp-cli.yml
142+
touch $WPATH/wp-cli.yml
143+
cat << YML_CREATE > "$WPATH/wp-cli.yml"
144+
apache_modules:
145+
- mod_rewrite
146+
YML_CREATE
140147
wp --info --allow-root
141148

142149
# Create dir
@@ -153,21 +160,13 @@ CREATE USER '$WPDBUSER'@'localhost' IDENTIFIED BY '$WPDBPASS';
153160
GRANT ALL PRIVILEGES ON $WPDBNAME.* TO '$WPDBUSER'@'localhost';
154161
FLUSH PRIVILEGES;
155162
MYSQL_SCRIPT
156-
wp core config --allow-root --dbname=$WPDBNAME --dbuser=$WPDBUSER --dbpass=$WPDBPASS --dbhost=localhost
163+
wp core config --allow-root --dbname=$WPDBNAME --dbuser=$WPDBUSER --dbpass=$WPDBPASS --dbhost=localhost --extra-php <<PHP
164+
define( 'WP_DEBUG', false );
165+
define( 'WP_CACHE_KEY_SALT', 'wpredis_' );
166+
define( 'WP_REDIS_MAXTTL', 9600);
167+
PHP
157168
echo "Wordpress DB: $WPDBPASS" >> $PW_FILE
158169

159-
# Create wp-cli.yml
160-
touch $WPATH/wp-cli.yml
161-
cat << YML_CREATE > "$WPATH/wp-cli.yml"
162-
apache_modules:
163-
- mod_rewrite
164-
core config:
165-
extra-php: |
166-
define( 'WP_DEBUG', false );
167-
define( 'WP_CACHE_KEY_SALT', 'wpredis_' );
168-
define( 'WP_REDIS_MAXTTL', 9600);
169-
YML_CREATE
170-
171170
# Install Wordpress
172171
wp core install --allow-root --url=http://$ADDRESS/wordpress/ --title=Wordpress --admin_user=$WPADMINUSER --admin_password=$WPADMINPASS [email protected] --skip-email
173172
echo "WP PASS: $WPADMINPASS" > /var/adminpass.txt

0 commit comments

Comments
 (0)