tejas tejas - 14 days ago 5
Apache Configuration Question

How do I start plack application on boot

Does anyone know how to start a plack application on boot.

The os is raspbian(raspberry pi).
I think i have run it as a normal user(pi). That's how i start it manually.

I have tried adding something like this to

rc.local
but without success

su pi -c 'cd /path/to/app && plackup -d -p 5000 -r -R ./lib,./t -a ./bin/app.psgi &'


This will in-turn be used by Apache and the app is written in dancer2 if it makes any difference.

Answer

The issue was that the perl 5 environment variables were not initialised (which are in .bashrc).

so the solution was to run the plackup command inside bash -i so that it reads .bashrc or set the PERL5LIB before invoking plackup

Comments