The PSGI/Plack interface is unbelievably good to develop for, but I feel ashamed every time I have to tell our sysadmins that "I run this stuff as nohup twiggy --listen :1234 app.psgi & from my home directory, oh and it must be up 24x7 on production".

So I'd like to write an init script for my PSGI apps once and for all.

Previous searches suggest using Ubic::Service::Plack but I fear our admins would object, as they already have init for running/stopping and zabbix for monitoring. I believe there are other people in the Perl community who have their reasons to stick to sys v init.

Now, there's Daemon::Control so I only have to reinvent a wheel of minimal diameter. Looks like there's some prior art, but I'd like to generalize a bit.

In my ideal world with unicorns and pegasi, the workflow should look like:

The main config should contain: app files relocation (like /etc/plack/apps.d), sane defaults for apps, and probably more. Upon loading the config it should be checked for sanity, consistency, port/name/pidfile intersections, etc.

An app config may contain:

Now some questions I'd like to ask before doing any serious development.


In reply to RFC: SysVInit script for multiple PSGI applications by Dallaylaen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.