there is already *Type=forking *in the service section
2014/1/23 Mathieu Bridon <boche...@fedoraproject.org> > On Thu, 2014-01-23 at 10:51 +0100, Marwan Rabbâa wrote: > > that is not very useful for me. /var/www/gitlab/script/sidekiq is just > > a litle startup script for sidekiq > > ******************************************** > > #!/usr/bin/env sh > > > > > > cd /var/www/gitlab > > /usr/local/bin/bundle exec sidekiq -q > > > post_receive,mailer,system_hook,project_web_hook,gitlab_shell,common,default > -e production -P /var/run/gitlab-sidekiq.pid -d -L > /var/www/gitlab/log/sidekiq.log >> /var/www/gitlab/log/sidekiq.log 2>&1 > > ******************************************** > > > > When I run this script in a tty, I have a 0 exit code, I presume it > > works (the process behind is started). > > The way sidekiq is started, it forks itself as a daemon, and the parent > process exits. > > Because you didn't specify the Type= option in the > gitlab-sidekiq.service file, systemd assumes the default: Type=simple > > This means that systemd expects the main process to just start, and keep > running forever. (systemd handles the forking) > > So when the parent process exits after forking, systemd assumes that the > service failed. > > To fix this, you should use Type=forking in your gitlab-sidekiq.service > file. > > I recommend you look at the systemd.service(5) manual page for more > details. > > > -- > Mathieu > >
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel