From d6bd4ecbd35a09136e46855be406996b2cc54118 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Thu, 29 May 2014 11:18:29 +0200 Subject: [PATCH] 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