Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish BACKUPMON v1.8.19 #56

Merged
merged 9 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 27 additions & 17 deletions CustomMiscUtils/master/EMail/CustomEMailFunctions.lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
# email notifications using AMTM email configuration file.
#
# Creation Date: 2020-Jun-11 [Martinski W.]
# Last Modified: 2024-Jul-08 [Martinski W.]
# Last Modified: 2024-Jul-17 [Martinski W.]
######################################################################

if [ -z "${_LIB_CustomEMailFunctions_SHELL_:+xSETx}" ]
then _LIB_CustomEMailFunctions_SHELL_=0
else return 0
fi

CEM_LIB_VERSION="0.9.21"
CEM_LIB_VERSION="0.9.22"
CEM_TXT_VERFILE="cemVersion.txt"

CEM_LIB_REPO_BRANCH="master"
CEM_LIB_SCRIPT_URL1="https://raw.githubusercontent.com/MartinSkyW/CustomMiscUtils/${CEM_LIB_REPO_BRANCH}/EMail"
CEM_LIB_SCRIPT_URL2="https://raw.githubusercontent.com/Martinski4GitHub/CustomMiscUtils/${CEM_LIB_REPO_BRANCH}/EMail"
CEM_LIB_SCRIPT_URL2="https://raw.githubusercontent.com/MartinSkyW/CustomMiscUtils/${CEM_LIB_REPO_BRANCH}/EMail"
CEM_LIB_SCRIPT_URL1="https://raw.githubusercontent.com/Martinski4GitHub/CustomMiscUtils/${CEM_LIB_REPO_BRANCH}/EMail"

if [ -z "${cemIsVerboseMode:+xSETx}" ]
then cemIsVerboseMode=true ; fi
Expand Down Expand Up @@ -127,16 +127,19 @@ _CheckLibraryUpdates_CEM_()
if [ ! -s "$theVersTextFile" ] || \
grep -Eiq "^404: Not Found" "$theVersTextFile"
then
[ -s "$theVersTextFile" ] && { echo ; cat "$theVersTextFile" ; }
if [ "$2" -eq "$urlDLMax" ] || "$showAllMsgs" || "$showWarnings"
then
[ -s "$theVersTextFile" ] && { echo ; cat "$theVersTextFile" ; }
_PrintMsg_CEM_ "\n**WARNING**: Unable to download the version file [$CEM_TXT_VERFILE]\n"
[ "$2" -lt "$urlDLMax" ] && _PrintMsg_CEM_ "Trying again with a different URL...\n"
fi
rm -f "$theVersTextFile"
_PrintMsg_CEM_ "\n**WARNING**: Unable to download the version file [$CEM_TXT_VERFILE]\n"
[ "$2" -lt "$urlDLMax" ] && _PrintMsg_CEM_ "Trying again with a different URL...\n"
return 1
else
[ "$2" -gt 1 ] && echo
if [ "$2" -gt 1 ] || { "$cemIsVerboseMode" && "$showMsg" ; }
if "$showAllMsgs" || { [ "$2" -gt 1 ] && "$showWarnings" ; }
then
_PrintMsg_CEM_ "The library version file [$CEM_TXT_VERFILE] was downloaded.\n"
[ "$2" -gt 1 ] && echo
_PrintMsg_CEM_ "The email library version file [$CEM_TXT_VERFILE] was downloaded.\n"
fi
return 0
fi
Expand All @@ -150,13 +153,20 @@ _CheckLibraryUpdates_CEM_()
fi
local theVersTextFile="${1}/$CEM_TXT_VERFILE"
local libraryVerNum dlFileVersNum dlFileVersStr
local showMsg retCode urlDLCount urlDLMax
local showAllMsgs="$cemIsVerboseMode" showWarnings=true
local retCode urlDLCount urlDLMax

if [ $# -gt 1 ] && echo "$2" | grep -qE "^[-]?quiet$"
then showMsg=false ; else showMsg=true ; fi
if [ $# -gt 1 ]
then
if echo "$2" | grep -qE "^[-]?quiet$"
then showAllMsgs=false
elif [ "$2" = "-veryquiet" ]
then showAllMsgs=false ; showWarnings=false
fi
fi

"$cemIsVerboseMode" && "$showMsg" && \
_PrintMsg_CEM_ "\nChecking for shared email library script updates...\n"
"$showAllMsgs" && \
_PrintMsg_CEM_ "\nChecking for the shared email library script updates...\n"

retCode=1 ; urlDLCount=0 ; urlDLMax=2
for cemLibScriptURL in "$CEM_LIB_SCRIPT_URL1" "$CEM_LIB_SCRIPT_URL2"
Expand All @@ -176,12 +186,12 @@ _CheckLibraryUpdates_CEM_()
if [ "$dlFileVersNum" -le "$libraryVerNum" ]
then
retCode=1
"$cemIsVerboseMode" && "$showMsg" && \
"$showAllMsgs" && \
_PrintMsg_CEM_ "Update check done.\n"
else
_DoReInit_CEM_
retCode=0
"$cemIsVerboseMode" && "$showMsg" && \
"$showAllMsgs" && \
_PrintMsg_CEM_ "New email library script version [$dlFileVersStr] is available.\n"
fi

Expand Down
2 changes: 1 addition & 1 deletion CustomMiscUtils/master/EMail/cemVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.21
0.9.22
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# BACKUPMON v1.8.18
# BACKUPMON v1.8.19
![image](https://github.com/user-attachments/assets/aaa613a4-5453-433b-af47-b209ce65e9b3)

**First off** -- HUGE thanks to @Jeffrey Young for sharing his original backup script. His script is the main engine of BACKUPMON, and all credit goes to him! BACKUPMON is simply a wrapper around Jeff's backup script functionality, adding easy-to-use menus, more status feedback, and the ability to launch a restore based on your previous backups. Also, big thanks to @Martinski for his many contributions as well as his extremely helpful AMTM email library script, and huge props to @visortgw for contributing to the backup methodologies thread with his scripts and wisdom!
Expand Down
File renamed without changes.
Loading