From 0e8911ae70d257a83c8f0d4eac811bbd205990a7 Mon Sep 17 00:00:00 2001 From: Matthew Connelly Date: Mon, 16 Nov 2015 00:47:37 +0000 Subject: [PATCH] well that was a stupid idea --- app.psgi => bin/app.pl | 0 start | 18 +++++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) rename app.psgi => bin/app.pl (100%) diff --git a/app.psgi b/bin/app.pl similarity index 100% rename from app.psgi rename to bin/app.pl diff --git a/start b/start index 23352c6..eb7b3be 100755 --- a/start +++ b/start @@ -1,5 +1,13 @@ -#!/usr/bin/env sh -[ -z "$APP_HOME$APP" ] && exit 1 -cd $APP_HOME/$APP -pkill -F $APP_HOME/${APP}.pid 2>/dev/null -plackup -s Starman -D -S $APP_HOME/$APP/.sock ./app.psgi --pid $APP_HOME/${APP}.pid +#!/bin/sh +[ -z "$BASE$APP" ] && exit 1 +#p5env setup +PATH="$BASE/perl5/bin${PATH+:}${PATH}"; export PATH; +PERL5LIB="$BASE/perl5/lib/perl5${PERL5LIB+:}${PERL5LIB}"; export PERL5LIB; +PERL_LOCAL_LIB_ROOT="$BASE/perl5${PERL_LOCAL_LIB_ROOT+:}${PERL_LOCAL_LIB_ROOT}"; export PERL_LOCAL_LIB_ROOT; +PERL_MB_OPT="--install_base \"$BASE/perl5\""; export PERL_MB_OPT; +PERL_MM_OPT="INSTALL_BASE=$BASE/perl5"; export PERL_MM_OPT; + +pkill -F $BASE/${APP}.pid 2>/dev/null +while true;do pkill -0 -F $BASE/${APP}.pid 2>/dev/null || break; sleep 1; done +cd $BASE/$APP +plackup -s Starman -D -S $BASE/$APP/.sock $BASE/$APP/bin/app.pl --pid $BASE/${APP}.pid $START_OPTS