hermes用戶添加腳本

#!/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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章