From ed036bebfd851a4ed87a94afb2f67009a41f1920 Mon Sep 17 00:00:00 2001 From: "b.waal" Date: Tue, 10 Sep 2019 09:48:45 +0200 Subject: [PATCH] Update 'resources/wordpress.sh' --- resources/wordpress.sh | 155 +++++++++++++++++++++-------------------- 1 file changed, 78 insertions(+), 77 deletions(-) diff --git a/resources/wordpress.sh b/resources/wordpress.sh index bce3a64..92a73f3 100644 --- a/resources/wordpress.sh +++ b/resources/wordpress.sh @@ -1,78 +1,79 @@ -#============================================================================== -# INSTALL SECOND WEBSITE WITH WORDPRESS -#============================================================================== -echo Welk domein mag gekoppeld worden? Typ domein zonder www -read domain -echo Standaard wachtwoord? -read passwd -echo Database user en name? -read db_name db_user -echo Standaard wachtwoord -read passwd -db_pass=$(date +%s|sha256sum|base64|head -c 32) -#-------------------# -# MYSQL CONFIG # -#-------------------# -mysql -u root -p"$passwd" -e "CREATE DATABASE "$db_name" DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;" -mysql -u root -p"$passwd" -e "GRANT ALL ON "$db_name".* TO '"$db_user"'@'localhost' IDENTIFIED BY '"$db_pass"';" -mysql -u root -p"$passwd" -e "FLUSH PRIVILEGES;" -#-------------------# -# WP - INSTALL # -#-------------------# -cd /tmp -curl -LO https://wordpress.org/latest.tar.gz -tar xzvf latest.tar.gz -cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php -cp -a /tmp/wordpress/. /var/www/"$domain"/html -chown -R www-data:www-data /var/www/"$domain"/html -WPSalts=$(wget https://api.wordpress.org/secret-key/1.1/salt/ -q -O -) -cat < /var/www/"$domain"/html/wp-config.php - array( -# '127.0.0.1:11211' -# ) -#); -#define('WP_REDIS_HOST', '127.0.0.1'); -#define('WP_REDIS_PASSWORD', '$passwd'); -#define('WP_REDIS_PORT', '6379'); -require_once(ABSPATH . 'wp-settings.php'); -EOF -#-------------------# -# OPCACHE GUI # -#-------------------# -cd /tmp -curl -LO https://raw.githubusercontent.com/amnuts/opcache-gui/master/index.php -cp /tmp/index.php /tmp/opcache.php -cp -a /tmp/opcache.php /var/www/"$domain"/html -cat > /var/www/"$domain"/html/info.php <<- "EOF" - +#============================================================================== +# INSTALL SECOND WEBSITE WITH WORDPRESS +#============================================================================== +echo Welk domein mag gekoppeld worden? Typ domein zonder www +read domain +echo Standaard wachtwoord? +read passwd +echo Database user en name? +read db_name db_user +echo Standaard wachtwoord +read passwd +db_pass=$(date +%s|sha256sum|base64|head -c 32) +#-------------------# +# MYSQL CONFIG # +#-------------------# +mysql -u root -p"$passwd" -e "CREATE DATABASE "$db_name" DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;" +mysql -u root -p"$passwd" -e "GRANT ALL ON "$db_name".* TO '"$db_user"'@'localhost' IDENTIFIED BY '"$db_pass"';" +mysql -u root -p"$passwd" -e "FLUSH PRIVILEGES;" +#-------------------# +# WP - INSTALL # +#-------------------# +cd /tmp +curl -LO https://wordpress.org/latest.tar.gz +tar xzvf latest.tar.gz +cp /tmp/wordpress/wp-config-sample.php /tmp/wordpress/wp-config.php +cp -a /tmp/wordpress/. /var/www/"$domain"/html +chown -R www-data:www-data /var/www/"$domain"/html +WPSalts=$(wget https://api.wordpress.org/secret-key/1.1/salt/ -q -O -) +cat < /var/www/"$domain"/html/wp-config.php + array( +# '127.0.0.1:11211' +# ) +#); +#define('WP_REDIS_HOST', '127.0.0.1'); +#define('WP_REDIS_PASSWORD', '$passwd'); +#define('WP_REDIS_PORT', '6379'); +require_once(ABSPATH . 'wp-settings.php'); +EOF +#-------------------# +# OPCACHE GUI # +#-------------------# +cd /tmp +curl -LO https://raw.githubusercontent.com/amnuts/opcache-gui/master/index.php +cp /tmp/index.php /tmp/opcache.php +cp -a /tmp/opcache.php /var/www/"$domain"/html +cat > /var/www/"$domain"/html/info.php <<- "EOF" + EOF \ No newline at end of file