opscode-cookbooks/chef-server — pull request #16 by paigeadele (2012-11-29 23:59:07+00:00)
Title: not sure how useful this is to you but,

heres the script I used to do it
https://gist.github.com/1056f8401918ee54c310

I actually use that script in a bootstrap template too if you can believe it..
could work in a bash_block too

I guess if you're actually interested in this I can contribute some more work.