diff options
| author | Paul Buetow <paul@buetow.org> | 2011-05-13 14:37:23 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2011-05-13 14:37:23 +0000 |
| commit | f6d96f69a1ecd79b8dbf99099e3b7c998e986bdf (patch) | |
| tree | 9298ab4786e78259a8cfcc135b461031ccc2a024 | |
| parent | 99facbe533184f818502f14205ac6566fbcd5e9b (diff) | |
using #!/usr/bin/env in shebang for bsd compat
| -rw-r--r-- | bin/perldaemon | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/perldaemon b/bin/perldaemon index 3a66064..43c385a 100644 --- a/bin/perldaemon +++ b/bin/perldaemon @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash declare -a LIBPATHS=(./lib ../lib /lib /usr/lib /usr/local/lib /opt/lib) @@ -9,21 +9,21 @@ for path in ${LIBPATHS[@]}; do fi done -start () perl -I$LIBDIR $LIBDIR/PerlDaemon/PerlDaemon.pl ./conf/perldaemon.conf -stop () kill $(cat ./run/perldaemon.pid) +function startPD () { perl -I$LIBDIR $LIBDIR/PerlDaemon/PerlDaemon.pl ./conf/perldaemon.conf } +function stopPD () { kill $(cat ./run/perldaemon.pid) } case $1 in start) - start + startPD ;; stop) - stop + stopPD ;; restart) - stop - start + stopPD + startPD ;; logrotate) @@ -35,3 +35,4 @@ case $1 in exit 1 ;; esac + |
