diff --git a/scripts/install b/scripts/install index 7e67db7..89069fb 100644 --- a/scripts/install +++ b/scripts/install @@ -28,7 +28,15 @@ if [[ ! $? -eq 0 ]]; then exit 1 fi +# check that admin user is an existing account +sudo yunohost user list --json | grep -q "\"username\": \"$admin\"" +if [[ ! $? -eq 0 ]]; then + echo "Error : the chosen admin user does not exist" + exit 1 +fi + # save app settings +sudo yunohost app setting $app admin_user -v "$admin" sudo yunohost app setting $app is_public -v "$is_public" sudo yunohost app setting $app domain -v "$domain" sudo yunohost app setting $app path -v "$path"