How can I set Rails user name?

Perhaps something like this:

#!/bin/sh

cd /path/to/rails

if [ `/usr/bin/whoami` = 'root' ]; then
    /bin/su -c "/usr/local/bin/mongrel_rails start -e production -p
6001 -d" rails_user
else
    /usr/local/bin/mongrel_rails start -e production -p 6001 -d
fi