Fancy new start script that is less weird

This commit is contained in:
Matthew Connelly 2015-11-15 23:22:16 +00:00
parent f3d9040c5e
commit 6eb967dfc0
3 changed files with 14 additions and 20 deletions

View File

@ -8,3 +8,4 @@ requires 'Date::Parse';
requires 'Time::HiRes';
requires 'Dancer2';
requires 'Starman';

View File

@ -1,19 +0,0 @@
#!/bin/tcsh
#p5env setup
if ! $?PATH setenv PATH '';
if "${PATH}" != '' setenv PATH "/usr/home/sites/perl5/bin:${PATH}";
if "${PATH}" == '' setenv PATH "/usr/home/sites/perl5/bin";
if ! $?PERL5LIB setenv PERL5LIB '';
if "${PERL5LIB}" != '' setenv PERL5LIB "/usr/home/sites/perl5/lib/perl5:${PERL5LIB}";
if "${PERL5LIB}" == '' setenv PERL5LIB "/usr/home/sites/perl5/lib/perl5";
if ! $?PERL_LOCAL_LIB_ROOT setenv PERL_LOCAL_LIB_ROOT '';
if "${PERL_LOCAL_LIB_ROOT}" != '' setenv PERL_LOCAL_LIB_ROOT "/usr/home/sites/perl5:${PERL_LOCAL_LIB_ROOT}";
if "${PERL_LOCAL_LIB_ROOT}" == '' setenv PERL_LOCAL_LIB_ROOT "/usr/home/sites/perl5";
if ! $?PERL_MB_OPT setenv PERL_MB_OPT '';
setenv PERL_MB_OPT "--install_base "\""/usr/home/sites/perl5"\""";
if ! $?PERL_MM_OPT setenv PERL_MM_OPT '';
setenv PERL_MM_OPT "INSTALL_BASE=/usr/home/sites/perl5";
pkill -F /home/sites/blogalba.pid 2>/dev/null
setenv BLOGALBA_DIR "/home/sites/blogalba/"
plackup -s Starman -D -p 42069 /home/sites/blogalba/blogalba --pid /home/sites/blogalba.pid --workers 1

12
start Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
[ -z "$BASE" ] && BASE=/usr/home/sites
#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
for((;;));do pkill -0 -F $BASE/${APP}.pid 2>/dev/null || break; sleep 1; done
plackup -s Starman -D -S $BASE/$APP/.sock $BASE/$APP/app.psgi --pid $BASE/${APP}.pid --workers 1