From 01c0c842ae18e76de8c6a6079549dd99c98519bf Mon Sep 17 00:00:00 2001 From: Iglesys Date: Mon, 21 Nov 2022 15:21:16 +0100 Subject: [PATCH] Fix small bug on env var export --- castor.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/castor.sh b/castor.sh index 3f0ceb8..92757b5 100644 --- a/castor.sh +++ b/castor.sh @@ -88,8 +88,9 @@ else fi # Read and export values from .env file -if test -f .env; then - export $(grep -v '^#' .env | xargs) +ENV_FILE="$CURRENT_PATH/.env" +if test -f $ENV_FILE; then + export $(grep -v '^#' $ENV_FILE | xargs) # Set default values with env vars (if any) port=$PROXY_PORT mode=$PROXY_MODE @@ -99,6 +100,7 @@ else mode=socks fi + # set default value for tor instances tors=5