hermes用户添加脚本

来源:互联网 发布:centos cacti 编辑:程序博客网 时间:2024/04/29 21:43
#!/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
原创粉丝点击