summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2011-05-13 14:15:08 +0000
committerPaul Buetow <paul@buetow.org>2011-05-13 14:15:08 +0000
commit6d08652164ba4853bbccd517a43c0200a7c2c765 (patch)
treea58dcefcda91b5dac2b872ccf7b76bef0ba2e131
parent2085476afe46f49c08b5a66b9b2201383096696c (diff)
added perl -I$LIBDIR startup option
-rw-r--r--bin/perldaemon14
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)