101 reputation
3
bio website jimneath.org
location Manchester, United Kingdom
age 30
visits member for 5 years, 8 months
seen Jan 29 at 11:20
Ruby geek.

Jan
8
awarded  Popular Question
Oct
2
comment Start a process as a specific user
Both the pid and log files are both owned by the rails user.
Oct
2
comment Start a process as a specific user
Running the following from terminal gives the correct result: "/bin/su rails -c '/usr/bin/god -c /home/rails/xxx/current/config/god.rb -P /home/rails/xxx/shared/pids/god.pid -l /home/rails/xxx/shared/log/god.log'" Why won't this work in the script?
Oct
2
revised Start a process as a specific user
Updated the script to show current version; deleted 18 characters in body
Oct
2
comment Start a process as a specific user
The script is already world readable/executable. It works fine as it currently is. I just need to change it to start up at the rails user.
Oct
2
awarded  Editor
Oct
2
revised Start a process as a specific user
added 2 characters in body
Oct
2
comment Start a process as a specific user
I originally copied the script from else where. I noticed the missing slashes when I pasted it before. Forgot to edit it. Thanks.
Oct
2
comment Start a process as a specific user
Also, I've tried "/bin/su rails -c 'god -c config/god.rb'" which works when I run it directly through terminal, but when I add it to the init.d script it fails to launch god at all
Oct
2
comment Start a process as a specific user
I couldn't tell you the if it fails silently or not. I'm just rebooting the box and seeing if god comes back up, as the right user. As I said, I'm a n00b :)
Oct
2
comment Start a process as a specific user
Alas, this didn't work. God failed to start at all. Thanks anyway :)
Oct
2
asked Start a process as a specific user
Aug
23
awarded  Autobiographer