From f6d96f69a1ecd79b8dbf99099e3b7c998e986bdf Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 13 May 2011 14:37:23 +0000 Subject: using #!/usr/bin/env in shebang for bsd compat --- bin/perldaemon | 15 ++++++++------- 1 file 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 + -- cgit v1.2.3