From 93092cff046f333894b3902268b922084d7ed055 Mon Sep 17 00:00:00 2001 From: cyanide-burnout Date: Wed, 3 Aug 2016 12:25:57 +0400 Subject: [PATCH] .. --- cronosagent.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cronosagent.sh b/cronosagent.sh index c170646..64c4f5a 100755 --- a/cronosagent.sh +++ b/cronosagent.sh @@ -1,9 +1,12 @@ #!/bin/bash -if [ -f cronosagent.conf ] +SCRIPT=$(readlink -f $0) +DIRECTORY=$(dirname $SCRIPT) + +if [ -f $DIRECTORY/cronosagent.conf ] then # Read configuration from text file - source cronosagent.conf + source $DIRECTORY/cronosagent.conf fi if [ -f /etc/config/cronosagent ] @@ -23,7 +26,7 @@ then SERVICE_MODE=$1 fi -./cronosagent \ +$DIRECTORY/cronosagent \ --trap-port 8162 \ --repeater-number ${REPEATER_NUMBER} \ --repeater-address ${REPEATER_ADDRESS} \