So I am trying to set up some application background processes to start on boot using systemd. It always gives me 127 exit code and I am not sure why. I thought that
ExecStart command is being executed in a wrong directory. So I added
ExecStartPre to output the current directory but it was not executed as well.
Here is my service file:
[Unit] Description=Background processes [Service] Type=simple User=epic Environment=RAILS_ENV=production WorkingDirectory=/home/epic/application ExecStartPre=/bin/pwd > /home/epic/test.sys ExecStart=/usr/local/rvm/gems/ruby-1.9.3-p194/bin/rake jobs:work
And the messages log shows when I execute
systemctl start epic.service:
Apr 24 05:13:01 application systemd: epic.service: main process exited, code=exited, status=127 Apr 24 05:13:01 application systemd: Unit epic.service entered failed state.
How can I know what is going wrong! I tried to execute the command in shell and it works (if it was in the right directory). The server is running on Fedora 15.