From 59fc61c03b3d31ed2315d4f44d794d07a4aefc7b Mon Sep 17 00:00:00 2001 From: Jonathan Maw Date: Mon, 3 Dec 2012 22:03:46 +0000 Subject: Attempt to make the http request work properly. --- request-trove-account | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/request-trove-account b/request-trove-account index e4efd96..d62baf6 100755 --- a/request-trove-account +++ b/request-trove-account @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # request-trove-account - E-mails codethink with your public key requesting # an account on the Trove. @@ -21,4 +21,10 @@ else sshkey=$(cat ~/.ssh/id_rsa.pub) fi -curl "http://trove-accounts.genivi.baserock.com/?name=$name&email=$email&phone=$phone&pubkey=$sshkey" +# remove leading/trailing white space (esp. newlines) from user data +name=$(echo -n $name) +email=$(echo -n $email) +phone=$(echo -n $phone) +sshkey=$(echo -n $sshkey) + +curl "http://trove-accounts.genivi.baserock.com/?name=$name&email=$email&phone=$phone&pubkey=$sshkey" >/dev/null -- cgit v1.2.1