From 841fbf2bc377c394455a2dfddd3a362d4bde389a Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Sun, 16 Sep 2018 01:45:18 -0600 Subject: [PATCH] Updated logfile name generation to strip final extension from scriptName --- cfddns.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cfddns.sh b/cfddns.sh index 3918fef..f4e3f6b 100755 --- a/cfddns.sh +++ b/cfddns.sh @@ -141,7 +141,8 @@ errorExplain[254]="Could not connect with CloudFlare API. Please re-run this scr ## Logging parameters -- default set to scriptname.ext.log in same ## directory as this script scriptPath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -logFile="$scriptPath/$(basename ${0}).log" +scriptName="$(basename ${0})" +logFile="$scriptPath/${scriptName%.*}.log" ### Process script parameters