From 6d08652164ba4853bbccd517a43c0200a7c2c765 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 13 May 2011 14:15:08 +0000 Subject: added perl -I$LIBDIR startup option --- bin/perldaemon | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/perldaemon b/bin/perldaemon index 0177798..83b4b5d 100644 --- a/bin/perldaemon +++ b/bin/perldaemon @@ -1,8 +1,18 @@ -#!/bin/bash +#!/bin/bash -x + + +declare -a LIBPATHS=(./lib ../lib /lib /usr/lib /usr/local/lib /opt/lib) + +for path in ${LIBPATHS[@]}; do + if [ -f $path/PerlDaemon/PerlDaemon.pl ]; then + LIBDIR=$path + break + fi +done case $1 in start) - perl PerlDaemon/PerlDaemon.pl ./conf/perldaemon.conf + perl -I$LIBDIR $LIBDIR/PerlDaemon/PerlDaemon.pl ./conf/perldaemon.conf ;; stop) -- cgit v1.2.3