1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wordpress_ynh.git synced 2024-09-03 20:36:10 +02:00

Merge pull request #6 from Kloadut/master

Few improvements (le retour)
This commit is contained in:
abeudin 2013-12-07 13:14:10 -08:00
commit 7883c2e1ac

View file

@ -7,6 +7,12 @@ admin_passwd=$3
language=$4 language=$4
is_public=$5 is_public=$5
# Check if admin password is not null
if [ "$admin_passwd" = "" ]; then
echo "Wrong password"
exit 1
fi
# Check domain/path availability # Check domain/path availability
sudo yunohost app checkurl $domain$path -a wordpress sudo yunohost app checkurl $domain$path -a wordpress
if [[ ! $? -eq 0 ]]; then if [[ ! $? -eq 0 ]]; then
@ -61,8 +67,9 @@ sudo yunohost app setting wordpress skipped_uris -v "/"
sudo yunohost app ssowatconf sudo yunohost app ssowatconf
# Wordpress installation # Wordpress installation
echo "127.0.0.1 $domain #wordpress" | sudo tee -a /etc/hosts echo "127.0.0.1 $domain #yunowordpress" | 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 1
curl -kL -X POST --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 > /dev/null 2>&1
sleep 5 sleep 5
mysql -u $db_user -p$db_pwd $db_user -e "select * from wp_options;" > /dev/null 2>&1 mysql -u $db_user -p$db_pwd $db_user -e "select * from wp_options;" > /dev/null 2>&1
result=$? result=$?
@ -83,4 +90,4 @@ then
else else
mysql -u $db_user -p$db_pwd $db_user < ../conf/public.sql mysql -u $db_user -p$db_pwd $db_user < ../conf/public.sql
fi fi
sudo sed -i '/wordpress/d' /etc/hosts sudo sed -i '/yunowordpress/d' /etc/hosts