diff --git a/scripts/install b/scripts/install index 7183b2d..4d9c2b4 100755 --- a/scripts/install +++ b/scripts/install @@ -7,11 +7,15 @@ 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 +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