summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2012-12-03 21:07:39 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2012-12-03 21:07:39 +0000
commitad48effdf7df4a82f64c6e41afece9928e753610 (patch)
treecb479271d0209aa9c5396b71ce8e1d17f78feaf9
parent4600c6b6781387cff481ff4ae261f174df2e4a26 (diff)
downloadgenivi-initial-setup-ad48effdf7df4a82f64c6e41afece9928e753610.tar.gz
Add script to E-mail codethink asking for an account on the trove
-rwxr-xr-xrequest-trove-account24
1 files changed, 24 insertions, 0 deletions
diff --git a/request-trove-account b/request-trove-account
new file mode 100755
index 0000000..e4efd96
--- /dev/null
+++ b/request-trove-account
@@ -0,0 +1,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"