From d6bd4ecbd35a09136e46855be406996b2cc54118 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Thu, 29 May 2014 11:18:29 +0200 Subject: [PATCH 1/4] Update install --- scripts/install | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 7183b2d..f0c3e2e 100755 --- a/scripts/install +++ b/scripts/install @@ -7,9 +7,10 @@ admin_wordpress=$3 language=$4 is_public=$5 -# Check if admin password is not null -if [ "$admin_wordpress" = "" ]; then -echo "Wrong admin" +# Check if admin exists +sudo yunohost user list --json | grep -q '"username": "$admin_wordpress"' +if [[ ! $? -eq 0 ]]; then + echo "Wrong admin" exit 1 fi From 5adeab33ea446372438c2852b51009414bc8fc8d Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Thu, 29 May 2014 12:04:53 +0200 Subject: [PATCH 2/4] [fix] typo --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index f0c3e2e..bf90b21 100755 --- a/scripts/install +++ b/scripts/install @@ -8,7 +8,7 @@ language=$4 is_public=$5 # Check if admin exists -sudo yunohost user list --json | grep -q '"username": "$admin_wordpress"' +sudo yunohost user list --json | grep -q "\"username\": \"$admin_wordpress\"" if [[ ! $? -eq 0 ]]; then echo "Wrong admin" exit 1 From edc831eb3815b99095dfd784908ad47e3776ba7b Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Thu, 29 May 2014 12:11:57 +0200 Subject: [PATCH 3/4] [fix] Store administrator for further usage --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index bf90b21..08dfde6 100755 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,7 @@ if [[ ! $? -eq 0 ]]; then echo "Wrong admin" exit 1 fi +sudo yunohost app setting wordpress admin -v $admin_wordpress # Check domain/path availability sudo yunohost app checkurl $domain$path -a wordpress From 49af4480a6c5faba5180235033d036d2285d447e Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Thu, 29 May 2014 12:17:02 +0200 Subject: [PATCH 4/4] [fix] Store useful values --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 08dfde6..4d9c2b4 100755 --- a/scripts/install +++ b/scripts/install @@ -14,6 +14,8 @@ if [[ ! $? -eq 0 ]]; then exit 1 fi sudo yunohost app setting wordpress admin -v $admin_wordpress +sudo yunohost app setting wordpress language -v $language +sudo yunohost app setting wordpress is_public -v $is_public # Check domain/path availability sudo yunohost app checkurl $domain$path -a wordpress