From 2876fb68488c5f5dd17b04234c83d3bdb0731d98 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Fri, 6 Dec 2013 20:03:00 +0100 Subject: [PATCH 01/16] Update manifest.json --- manifest.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 4dfb0ee..78ca0f0 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "Wordpress", "id": "wordpress", "description": { - "en": "WordPress is web software you can use to create a beautiful website or blog", + "en": "Create a beautiful blog or website easily", "fr": "Logiciel de création de blog ou de site Web" }, "developer": { @@ -39,8 +39,8 @@ "ask": { "en": "Is it a public Wordpress site ?" }, - "example": "Y/n", - "default": "Y" + "choices": ["Yes", "No"], + "default": "Yes" } From d31c412fb27570a9723fb40eebf1ed486f819df0 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Fri, 6 Dec 2013 20:12:41 +0100 Subject: [PATCH 02/16] Update install --- scripts/install | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 1ba3116..7837839 100755 --- a/scripts/install +++ b/scripts/install @@ -46,19 +46,21 @@ sudo service nginx reload sudo yunohost app setting wordpress skipped_uris -v "/" sudo yunohost app ssowatconf -#Installation Wordpress +# Wordpress installation echo "127.0.0.1 $domain #wordpress" | sudo tee -a /etc/hosts curl -X POST -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:12.0) Gecko/20100101 Firefox/12.0" -e "http://$domain$path/wp-admin/install.php?step=2" -H "Content-Type:application/x-www-form-urlencoded" -H "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" -H "Accept-Encoding:gzip, deflate" --data "?step=2&weblog_title=Yunohost&user_name=admin&admin_password=$admin_passwd&admin_password2=$admin_passwd&admin_email=admin@$domain&Submit=Install+WordPress" http://$domain$path/wp-admin/install.php?step=2&weblog_title=Yunohost&user_name=admin&admin_password=$admin_passwd&admin_password2=$admin_passwd&admin_email=admin@$domain&Submit=Install+WordPress mysql -u $db_user -p$db_pwd $db_user -e "select * from wp_options;" > /dev/null 2>&1 -RESULT=$? -while [ $RESULT != 0 ]; +loop_number=1 +result=$? +while [ $result != 0 ] && [ $loop_number -lt 5 ]; do sleep 5 mysql -u $db_user -p$db_pwd $db_user -e "select * from wp_options;" > /dev/null 2>&1 - RESULT=$? + let result=$? + let loop_number++ done -if [ $4 = "n" ]; +if [ $4 = "No" ]; then sudo yunohost app setting wordpress skipped_uris -d sudo yunohost app ssowatconf From a4533cc2a229368334eff944596ba44ae6bc2e02 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Fri, 6 Dec 2013 20:44:27 +0100 Subject: [PATCH 03/16] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 7837839..20bf969 100755 --- a/scripts/install +++ b/scripts/install @@ -48,7 +48,7 @@ sudo yunohost app ssowatconf # Wordpress installation echo "127.0.0.1 $domain #wordpress" | sudo tee -a /etc/hosts -curl -X POST -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:12.0) Gecko/20100101 Firefox/12.0" -e "http://$domain$path/wp-admin/install.php?step=2" -H "Content-Type:application/x-www-form-urlencoded" -H "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" -H "Accept-Encoding:gzip, deflate" --data "?step=2&weblog_title=Yunohost&user_name=admin&admin_password=$admin_passwd&admin_password2=$admin_passwd&admin_email=admin@$domain&Submit=Install+WordPress" http://$domain$path/wp-admin/install.php?step=2&weblog_title=Yunohost&user_name=admin&admin_password=$admin_passwd&admin_password2=$admin_passwd&admin_email=admin@$domain&Submit=Install+WordPress +curl -X POST -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:12.0) Gecko/20100101 Firefox/12.0" -e "http://$domain$path/wp-admin/install.php?step=2" -H "Content-Type:application/x-www-form-urlencoded" -H "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" -H "Accept-Encoding:gzip, deflate" --data "?step=2&weblog_title=YunoBlog&user_name=admin&admin_password=$admin_passwd&admin_password2=$admin_passwd&admin_email=admin@$domain&Submit=Install+WordPress" http://$domain$path/wp-admin/install.php?step=2&weblog_title=YunoBlog&user_name=admin&admin_password=$admin_passwd&admin_password2=$admin_passwd&admin_email=admin@$domain&Submit=Install+WordPress mysql -u $db_user -p$db_pwd $db_user -e "select * from wp_options;" > /dev/null 2>&1 loop_number=1 result=$? From c9c725eb9cdf21978ad99fbbb74ae3273943eb41 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Fri, 6 Dec 2013 22:59:41 +0100 Subject: [PATCH 04/16] Update install --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 20bf969..989aa44 100755 --- a/scripts/install +++ b/scripts/install @@ -49,9 +49,10 @@ sudo yunohost app ssowatconf # Wordpress installation echo "127.0.0.1 $domain #wordpress" | sudo tee -a /etc/hosts curl -X POST -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:12.0) Gecko/20100101 Firefox/12.0" -e "http://$domain$path/wp-admin/install.php?step=2" -H "Content-Type:application/x-www-form-urlencoded" -H "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" -H "Accept-Encoding:gzip, deflate" --data "?step=2&weblog_title=YunoBlog&user_name=admin&admin_password=$admin_passwd&admin_password2=$admin_passwd&admin_email=admin@$domain&Submit=Install+WordPress" http://$domain$path/wp-admin/install.php?step=2&weblog_title=YunoBlog&user_name=admin&admin_password=$admin_passwd&admin_password2=$admin_passwd&admin_email=admin@$domain&Submit=Install+WordPress +sleep 5 mysql -u $db_user -p$db_pwd $db_user -e "select * from wp_options;" > /dev/null 2>&1 -loop_number=1 result=$? +loop_number=1 while [ $result != 0 ] && [ $loop_number -lt 5 ]; do sleep 5 From 898131993045b99670ab3e64a8b675f4f6089d5a Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Fri, 6 Dec 2013 23:14:31 +0100 Subject: [PATCH 05/16] Update wp-config.php --- conf/wp-config.php | 89 +++++----------------------------------------- 1 file changed, 9 insertions(+), 80 deletions(-) diff --git a/conf/wp-config.php b/conf/wp-config.php index 16e3832..5dd55a1 100644 --- a/conf/wp-config.php +++ b/conf/wp-config.php @@ -1,99 +1,28 @@ ]P8)5%(S;4Jv;}5Hpi'); -define('LOGGED_IN_KEY', 'b(M|@_C*=RCx~~=X(-G|t{%3Up=h(Z|_UP&YA)]-d-js|VX3b1v1;NH[`#4L[EO='); -define('NONCE_KEY', 'XseL2lp5}2_?~s&EJ_Ut7{(VC-e4n$t_y(t}EpHKEy0`7<6'); -define('AUTH_SALT', '+M|psJjNE(>kpozF-%$PN7y=q+E5PE?f-QBN[|.q0]m|n(6@Yo@h03YW3p~|*G5g5vYmoci[t$ 9EqLKS4-~;W>y'); -define('LOGGED_IN_SALT', 'jgQ4 ~ 0f6|zS}Cd6<&y7?+iRU`woOK65|M-_+X.[r Ka 6l}1fiH-m$dN2t)BcH'); -define('NONCE_SALT', ';-FHEOgPbgx{{;Z19L7:v|f+9j-T5mv)g.L6-6_5KH|{-|p?G<}^rZ>$1qI/!wRb'); -/**#@-*/ +// Keys +KEYSTOCHANGE -/** - * Préfixe de base de données pour les tables de WordPress. - * - * Vous pouvez installer plusieurs WordPress sur une seule base de données - * si vous leur donnez chacune un préfixe unique. - * N'utilisez que des chiffres, des lettres non-accentuées, et des caractères soulignés! - */ +// Prefix $table_prefix = 'wp_'; -/** - * Langue de localisation de WordPress, par défaut en Anglais. - * - * Modifiez cette valeur pour localiser WordPress. Un fichier MO correspondant - * au langage choisi doit être installé dans le dossier wp-content/languages. - * Par exemple, pour mettre en place une traduction française, mettez le fichier - * fr_FR.mo dans wp-content/languages, et réglez l'option ci-dessous à "fr_FR". - */ -define('WPLANG', 'en_EN'); +// i18n +define('WPLANG', 'I18NTOCHANGE'); -/** - * Pour les développeurs : le mode deboguage de WordPress. - * - * En passant la valeur suivante à "true", vous activez l'affichage des - * notifications d'erreurs pendant votre essais. - * Il est fortemment recommandé que les développeurs d'extensions et - * de thèmes se servent de WP_DEBUG dans leur environnement de - * développement. - */ +// Debug mode define('WP_DEBUG', false); -/* C'est tout, ne touchez pas à ce qui suit ! Bon blogging ! */ - -/** Chemin absolu vers le dossier de WordPress. */ +// Path if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); -/** Réglage des variables de WordPress et de ses fichiers inclus. */ +// WordPress settings path require_once(ABSPATH . 'wp-settings.php'); From 98c508bef76baf7fcf6701ab7752253c80745115 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Fri, 6 Dec 2013 23:21:36 +0100 Subject: [PATCH 06/16] Update install --- scripts/install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 989aa44..26cbd4a 100755 --- a/scripts/install +++ b/scripts/install @@ -4,6 +4,8 @@ domain=$1 path=$2 admin_passwd=$3 +language=$4 +is_public=$5 # Check domain/path availability sudo yunohost app checkurl $domain$path -a wordpress @@ -31,6 +33,8 @@ sudo cp ../conf/wp-config.php $final_path/wp-config.php sudo sed -i "s/yunouser/$db_user/g" $final_path/wp-config.php sudo sed -i "s/yunopass/$db_pwd/g" $final_path/wp-config.php sudo sed -i "s/yunobase/$db_user/g" $final_path/wp-config.php +sudo sed -i "s/KEYSTOCHANGE/$(curl https://api.wordpress.org/secret-key/1.1/salt/)/g" $final_path/wp-config.php +sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/wp-config.php sudo sed -i "s@URLWORDPRESS@$domain$path@g" ../conf/*.sql # Set permissions to roundcube directory @@ -61,7 +65,7 @@ do let loop_number++ done -if [ $4 = "No" ]; +if [ $is_public = "No" ]; then sudo yunohost app setting wordpress skipped_uris -d sudo yunohost app ssowatconf From ea409a3b67f9fc0311258e4e1499d0bb315b60a5 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Fri, 6 Dec 2013 23:26:13 +0100 Subject: [PATCH 07/16] Update manifest.json --- manifest.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/manifest.json b/manifest.json index 78ca0f0..f9a1e38 100644 --- a/manifest.json +++ b/manifest.json @@ -34,6 +34,14 @@ "en": "Choose a password for Wordpress administrator" } }, + { + "name": "language", + "ask": { + "en": "Choose the language of the Wordpress site" + }, + "choices": ["en_EN", "fr_FR"], + "default": "en_EN" + }, { "name": "public_site", "ask": { From ba4c9d04415e484147c41b03eac14bcff21c05ad Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Fri, 6 Dec 2013 23:31:03 +0100 Subject: [PATCH 08/16] Update install --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 26cbd4a..2615200 100755 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,8 @@ sudo cp ../conf/wp-config.php $final_path/wp-config.php sudo sed -i "s/yunouser/$db_user/g" $final_path/wp-config.php sudo sed -i "s/yunopass/$db_pwd/g" $final_path/wp-config.php sudo sed -i "s/yunobase/$db_user/g" $final_path/wp-config.php -sudo sed -i "s/KEYSTOCHANGE/$(curl https://api.wordpress.org/secret-key/1.1/salt/)/g" $final_path/wp-config.php +keys=$(curl https://api.wordpress.org/secret-key/1.1/salt/ -kL) +sudo sed -i "s/KEYSTOCHANGE/$keys/g" $final_path/wp-config.php sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/wp-config.php sudo sed -i "s@URLWORDPRESS@$domain$path@g" ../conf/*.sql From 70890996c20fbc4015d10e31022c4674be0d3544 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Fri, 6 Dec 2013 23:39:54 +0100 Subject: [PATCH 09/16] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 2615200..5c56b7e 100755 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ sudo cp ../conf/wp-config.php $final_path/wp-config.php sudo sed -i "s/yunouser/$db_user/g" $final_path/wp-config.php sudo sed -i "s/yunopass/$db_pwd/g" $final_path/wp-config.php sudo sed -i "s/yunobase/$db_user/g" $final_path/wp-config.php -keys=$(curl https://api.wordpress.org/secret-key/1.1/salt/ -kL) +keys=$(wget -qO - https://api.wordpress.org/secret-key/1.1/salt/) sudo sed -i "s/KEYSTOCHANGE/$keys/g" $final_path/wp-config.php sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/wp-config.php sudo sed -i "s@URLWORDPRESS@$domain$path@g" ../conf/*.sql From 0c4797e0c38154f708bbe51384035708a9bef810 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Fri, 6 Dec 2013 23:40:16 +0100 Subject: [PATCH 10/16] Delete wp-config-sample.php --- sources/wp-config-sample.php | 99 ------------------------------------ 1 file changed, 99 deletions(-) delete mode 100644 sources/wp-config-sample.php diff --git a/sources/wp-config-sample.php b/sources/wp-config-sample.php deleted file mode 100644 index b70924b..0000000 --- a/sources/wp-config-sample.php +++ /dev/null @@ -1,99 +0,0 @@ - Date: Sat, 7 Dec 2013 00:00:39 +0100 Subject: [PATCH 11/16] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 5c56b7e..59b11e8 100755 --- a/scripts/install +++ b/scripts/install @@ -34,6 +34,7 @@ sudo sed -i "s/yunouser/$db_user/g" $final_path/wp-config.php sudo sed -i "s/yunopass/$db_pwd/g" $final_path/wp-config.php sudo sed -i "s/yunobase/$db_user/g" $final_path/wp-config.php keys=$(wget -qO - https://api.wordpress.org/secret-key/1.1/salt/) +keys=$(echo $keys | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/&/\\\&/g') sudo sed -i "s/KEYSTOCHANGE/$keys/g" $final_path/wp-config.php sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/wp-config.php sudo sed -i "s@URLWORDPRESS@$domain$path@g" ../conf/*.sql From 4a9bea3bb56c85e021ea95bc08314006fdf7945c Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Sat, 7 Dec 2013 00:12:04 +0100 Subject: [PATCH 12/16] Update wp-config.php --- conf/wp-config.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/conf/wp-config.php b/conf/wp-config.php index 5dd55a1..d4d1b26 100644 --- a/conf/wp-config.php +++ b/conf/wp-config.php @@ -9,7 +9,14 @@ define('DB_CHARSET', 'utf8'); define('DB_COLLATE', ''); // Keys -KEYSTOCHANGE +define('AUTH_KEY', 'KEY1'); +define('SECURE_AUTH_KEY', 'KEY2'); +define('LOGGED_IN_KEY', 'KEY3'); +define('NONCE_KEY', 'KEY4'); +define('AUTH_SALT', 'KEY5'); +define('SECURE_AUTH_SALT', 'KEY6'); +define('LOGGED_IN_SALT', 'KEY7'); +define('NONCE_SALT', 'KEY8'); // Prefix $table_prefix = 'wp_'; From b0b4080bc9f08b0632d804913ce39acd75fdc439 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Sat, 7 Dec 2013 00:15:36 +0100 Subject: [PATCH 13/16] Update install --- scripts/install | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 59b11e8..a6ca678 100755 --- a/scripts/install +++ b/scripts/install @@ -15,6 +15,14 @@ fi # Generate random password db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') +key1=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') +key2=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') +key3=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') +key4=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') +key5=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') +key6=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') +key7=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') +key8=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') # Use 'wordpress' as database name and user db_user=wordpress @@ -33,9 +41,14 @@ sudo cp ../conf/wp-config.php $final_path/wp-config.php sudo sed -i "s/yunouser/$db_user/g" $final_path/wp-config.php sudo sed -i "s/yunopass/$db_pwd/g" $final_path/wp-config.php sudo sed -i "s/yunobase/$db_user/g" $final_path/wp-config.php -keys=$(wget -qO - https://api.wordpress.org/secret-key/1.1/salt/) -keys=$(echo $keys | sed -e 's/\\/\\\\/g' -e 's/\//\\\//g' -e 's/&/\\\&/g') -sudo sed -i "s/KEYSTOCHANGE/$keys/g" $final_path/wp-config.php +sudo sed -i "s/KEY1/$key1/g" $final_path/wp-config.php +sudo sed -i "s/KEY2/$key2/g" $final_path/wp-config.php +sudo sed -i "s/KEY3/$key3/g" $final_path/wp-config.php +sudo sed -i "s/KEY4/$key4/g" $final_path/wp-config.php +sudo sed -i "s/KEY5/$key5/g" $final_path/wp-config.php +sudo sed -i "s/KEY6/$key6/g" $final_path/wp-config.php +sudo sed -i "s/KEY7/$key7/g" $final_path/wp-config.php +sudo sed -i "s/KEY8/$key8/g" $final_path/wp-config.php sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/wp-config.php sudo sed -i "s@URLWORDPRESS@$domain$path@g" ../conf/*.sql From 15caa5eb47e4f8d14ba3e7eb2b083c4b82bf97c9 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Sat, 7 Dec 2013 00:19:53 +0100 Subject: [PATCH 14/16] Update install --- scripts/install | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/scripts/install b/scripts/install index a6ca678..752da1d 100755 --- a/scripts/install +++ b/scripts/install @@ -15,14 +15,6 @@ fi # Generate random password db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') -key1=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') -key2=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') -key3=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') -key4=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') -key5=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') -key6=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') -key7=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') -key8=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') # Use 'wordpress' as database name and user db_user=wordpress @@ -41,14 +33,11 @@ sudo cp ../conf/wp-config.php $final_path/wp-config.php sudo sed -i "s/yunouser/$db_user/g" $final_path/wp-config.php sudo sed -i "s/yunopass/$db_pwd/g" $final_path/wp-config.php sudo sed -i "s/yunobase/$db_user/g" $final_path/wp-config.php -sudo sed -i "s/KEY1/$key1/g" $final_path/wp-config.php -sudo sed -i "s/KEY2/$key2/g" $final_path/wp-config.php -sudo sed -i "s/KEY3/$key3/g" $final_path/wp-config.php -sudo sed -i "s/KEY4/$key4/g" $final_path/wp-config.php -sudo sed -i "s/KEY5/$key5/g" $final_path/wp-config.php -sudo sed -i "s/KEY6/$key6/g" $final_path/wp-config.php -sudo sed -i "s/KEY7/$key7/g" $final_path/wp-config.php -sudo sed -i "s/KEY8/$key8/g" $final_path/wp-config.php +for i in 1 2 3 4 5 6 7 8 +do + j=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') + sudo sed -i "s/KEY$i/$j/g" $final_path/wp-config.php +done sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/wp-config.php sudo sed -i "s@URLWORDPRESS@$domain$path@g" ../conf/*.sql From 802da8386b63e29d841935805cd952b64e6af222 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Sat, 7 Dec 2013 00:25:53 +0100 Subject: [PATCH 15/16] Update install --- scripts/install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install b/scripts/install index 752da1d..43f02f7 100755 --- a/scripts/install +++ b/scripts/install @@ -36,6 +36,12 @@ sudo sed -i "s/yunobase/$db_user/g" $final_path/wp-config.php for i in 1 2 3 4 5 6 7 8 do j=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') + if [ $j = "" ]; + then + # For obscure reasons, the loop is too fast at execution + sleep 1 + j=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') + fi sudo sed -i "s/KEY$i/$j/g" $final_path/wp-config.php done sudo sed -i "s/I18NTOCHANGE/$language/g" $final_path/wp-config.php From 078ed6e22c5c33d78adf496fa5d346155960cae3 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Sat, 7 Dec 2013 00:46:19 +0100 Subject: [PATCH 16/16] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 43f02f7..6fef299 100755 --- a/scripts/install +++ b/scripts/install @@ -36,7 +36,7 @@ sudo sed -i "s/yunobase/$db_user/g" $final_path/wp-config.php for i in 1 2 3 4 5 6 7 8 do j=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{40\}\).*/\1/p') - if [ $j = "" ]; + if [ "$j" = "" ]; then # For obscure reasons, the loop is too fast at execution sleep 1