#!/bin/bash
read -p "Please input your email:" a
read -p "Please input your service-name:" b
read -p "Please input your stringid:" c
read -p "Please input your password for hermes:" d
RAILS_ENV=production /srv/www/hermes/starship/script/console << ECF
p = Person.new
p.email = '$a'
p.name = '$b'
p.stringid = '$c'
p.salt = Person.random_string(10)
p.hashed_password = Person.encrypt('$d', p.salt)
p.admin = true
p.save
exit
EOF
exit 0
read -p "Please input your email:" a
read -p "Please input your service-name:" b
read -p "Please input your stringid:" c
read -p "Please input your password for hermes:" d
RAILS_ENV=production /srv/www/hermes/starship/script/console << ECF
p = Person.new
p.email = '$a'
p.name = '$b'
p.stringid = '$c'
p.salt = Person.random_string(10)
p.hashed_password = Person.encrypt('$d', p.salt)
p.admin = true
p.save
exit
EOF
exit 0