0

I have a sinatra ruby script that I want to be running at all times.

Would it be the best to run it as a service? So I can restart it easily.

How can I install my script on OSX 10.6.2 as a service?

1 Answer 1

2

Use launchd and specify the following in your LaunchDaemon/LaunchAgent's configuration:

<key>KeepAlive</key>
<true/>

This optional key is used to control whether your job is to be kept continuously running or to let demand and conditions control the invocation. The default is false and therefore only demand will start the job. The value may be set to true to unconditionally keep the job alive. [...]


To restart, I believe you can just kill it and it'll come back automatically.

2
  • I think you wanted that to be <true/>. Mar 3, 2011 at 7:55
  • @BenAlpert <true/>
    – Daniel Beck
    Mar 3, 2011 at 9:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .