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.

Comment on RFC: SysVInit script for multiple PSGI applications
Re: RFC: SysVInit script for multiple PSGI applications
by talexb (Canon) on Jul 05, 2013 at 13:17 UTC

    This sounds like a really cool project. I've bookmarked this page for next week when I hope to have some development time.

    I'll be back. :)

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

      Well, I've started developing some code on github. I would appreciate help and/or critique!