From 384b61ca907055196d03f4bcb95e56706394e4a8 Mon Sep 17 00:00:00 2001 From: Martinski <119833648+Martinski4GitHub@users.noreply.github.com> Date: Sun, 22 Sep 2024 00:48:14 -0700 Subject: [PATCH] Some cleanup. Removed code used only for testing & debugging purposes. --- MerlinAU.sh | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/MerlinAU.sh b/MerlinAU.sh index 4f2e2c74..861fbf48 100644 --- a/MerlinAU.sh +++ b/MerlinAU.sh @@ -94,13 +94,6 @@ readonly cronJobsRegEx5="[[:blank:]]+${USB_MNT_DIRPATH1}/.* " readonly cronJobsRegEx6="[[:blank:]]+${USB_MNT_DIRPATH2}/.* " readonly addonCronJobList="/home/root/addonCronJobList_$$.txt" -##FOR TESTING/DEBUG ONLY## -debugAddOnCronJobsList=false -##Set to 'false' for Production Release ## -[ "$SCRIPT_BRANCH" = "master" ] && debugAddOnCronJobsList=false -readonly restoreAddOnCronJobList="${SETTINGS_DIR}/restoreAddOnCronJobs.sh" -##FOR TESTING/DEBUG ONLY## - ##----------------------------------------## ## Modified by Martinski W. [2024-Jun-05] ## ##----------------------------------------## @@ -5131,17 +5124,6 @@ _RemoveCronJobsFromAddOns_() return 1 fi - ##FOR TESTING/DEBUG ONLY## - if "$debugAddOnCronJobsList" - then - { - echo "#!/bin/sh" - echo "# Created by ${SCRIPT_NAME} #" - echo "#" - } > "$restoreAddOnCronJobList" - fi - ##FOR TESTING/DEBUG ONLY## - local cronJobCount=0 cronJobIDx cronJobCMD while read -r cronJobLINE @@ -5162,29 +5144,11 @@ _RemoveCronJobsFromAddOns_() else Say "Cron job [$cronJobIDx] was removed successfully." fi fi - - ##FOR TESTING/DEBUG ONLY## - if "$debugAddOnCronJobsList" && [ -n "$cronJobIDx" ] - then - { - printf "cru a $cronJobIDx \"${cronJobCMD}\"\n" - } >> "$restoreAddOnCronJobList" - fi - ##FOR TESTING/DEBUG ONLY## - done < "$addonCronJobList" rm -f "$addonCronJobList" Say "Cron jobs [$cronJobCount] from 3rd-party add-ons were removed." - ##FOR TESTING/DEBUG ONLY## - if "$debugAddOnCronJobsList" - then - echo "#EOF#" >> "$restoreAddOnCronJobList" - chmod 755 "$restoreAddOnCronJobList" - fi - ##FOR TESTING/DEBUG ONLY## - sleep 5 return 0 }