diff options
| author | Paul Buetow <paul@buetow.org> | 2011-05-13 14:15:08 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2011-05-13 14:15:08 +0000 |
| commit | 6d08652164ba4853bbccd517a43c0200a7c2c765 (patch) | |
| tree | a58dcefcda91b5dac2b872ccf7b76bef0ba2e131 | |
| parent | 2085476afe46f49c08b5a66b9b2201383096696c (diff) | |
added perl -I$LIBDIR startup option
| -rw-r--r-- | bin/perldaemon | 14 |
1 files changed, 12 insertions, 2 deletions
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) |
