From 9c2173ff6757f63bb85b1f8252f18d6f5f1afc22 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 5 Dec 2013 09:58:40 +0000 Subject: [PATCH] update install script --- manifest.json | 8 ++++++++ scripts/install | 9 ++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index f083442..8d22e20 100644 --- a/manifest.json +++ b/manifest.json @@ -34,6 +34,14 @@ }, "example": "" } + { + "name": "public_site", + "ask": { + "en": "Is it a public Wordpress site ? (Y/n)" + }, + "default": "Y" + } + ] } diff --git a/scripts/install b/scripts/install index 9489914..c2e69b5 100755 --- a/scripts/install +++ b/scripts/install @@ -47,8 +47,11 @@ sudo yunohost app setting wordpress skipped_uris -v "$path" sudo yunohost app ssowatconf #Installation Wordpress -sudo echo "127.0.0.1 $domain #wordpress" >> /etc/hosts +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 > /dev/null 2>&1 -#sudo yunohost app setting wordpress skipped_uris -v "/" -#sudo yunohost app ssowatconf +if [ $4 = "Y" ]; +then + #sudo yunohost app setting wordpress skipped_uris -v "/" + #sudo yunohost app ssowatconf +fi sudo sed -i '/wordpress/d' /etc/hosts