You are not logged in.

#1 2013-01-02 11:21:07

wabi
Member
Registered: 2005-04-04
Posts: 61

[SOLVED] systemd .service file for ruby rainbows server

I am trying to create a systemd .service file for a ruby rainbows server.

http://rainbows.rubyforge.org/

does anybody have experience with a forking deamon under systemd?

Mine immediatley terminates after starting.

Last edited by wabi (2013-01-03 11:11:02)

Offline

#2 2013-01-02 13:06:58

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,359
Website

Re: [SOLVED] systemd .service file for ruby rainbows server

I'm not familiar with with ruby rainbows - but forking daemon service files are about the simplest.

Just make sure to include "Type=forking".  And learn from my mistake that 'forking' is apparently case sensitive.

If you post what you have we can give better input.

Last edited by Trilby (2013-01-02 13:07:35)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#3 2013-01-03 11:10:47

wabi
Member
Registered: 2005-04-04
Posts: 61

Re: [SOLVED] systemd .service file for ruby rainbows server

This is a .service file that will work:

[Unit]
Description=Redmine Rainbows Rails server

[Service]
Type=forking
SyslogIdentifier=redmine
User=http
PIDFile=/var/www/redmine/tmp/pids/rainbows.pid
WorkingDirectory=/var/www/redmine

ExecStart=/usr/bin/bundle exec rainbows --host 127.0.0.1 --port 8001 --env production --daemonize --config-file /var/www/redmine/config/rainbows.rb
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -QUIT $MAINPID

[Install]
WantedBy=multi-user.target

Last edited by wabi (2013-01-03 11:11:38)

Offline

Board footer

Powered by FluxBB