summaryrefslogtreecommitdiff
path: root/request-trove-account
blob: e4efd96a0eddfa5eb8d1a60959da96e6e6c9fa91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# request-trove-account - E-mails codethink with your public key requesting
#                         an account on the Trove.

echo -n "Please enter your name: "
read name
echo -n "Please enter your E-mail address: "
read email
echo -n "Please enter a telephone number: "
read phone

if [ -e ~/.ssh/id_rsa.pub ]; then
	echo "RSA key found"
	sshkey=$(cat ~/.ssh/id_rsa.pub)
elif [ -e ~/.ssh/id_dsa.pub ]; then
	echo "DSA key found"
	sshkey=$(cat ~/.ssh/id_dsa.pub)
else
	echo "No SSH keys found. Generating an RSA key"
	ssh-keygen -t rsa
	sshkey=$(cat ~/.ssh/id_rsa.pub)
fi

curl "http://trove-accounts.genivi.baserock.com/?name=$name&email=$email&phone=$phone&pubkey=$sshkey"