From 60051d3c0ddc364b88d10c745764dce2bcf62ca9 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Thu, 21 Sep 2023 10:30:02 +0000 Subject: [PATCH] Bug fixes #87 --- universal/functions.bash | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/universal/functions.bash b/universal/functions.bash index a3c818c..846a17f 100644 --- a/universal/functions.bash +++ b/universal/functions.bash @@ -4,9 +4,10 @@ log () { } logfileSetup () { - if [ ! -f "/config/logs/$scriptName.txt" ]; then - echo "" > /config/logs/$scriptName-$(date +"%Y_%m_%d_%I_%M_%p").txt - chmod 666 "/config/logs/$scriptName-_$(date +"%Y_%m_%d_%I_%M_%p").txt" + logFileName="$scriptName-$(date +"%Y_%m_%d_%I_%M_%p").txt" + if [ ! -f "/config/logs/$logFileName" ]; then + echo "" > "/config/logs/$logFileName" + chmod 666 "/config/logs/$logFileName" fi }