feature(version): add version display to script

This commit is contained in:
Asif Bacchus 2022-07-12 15:07:36 -06:00
parent 475a0d0dd2
commit 47adaceed0
1 changed files with 6 additions and 0 deletions

View File

@ -175,6 +175,7 @@ writeLog() {
### parameter defaults
# script related
scriptVersion="4.0"
scriptPath="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)"
scriptName="$(basename "$0")"
errorCount=0
@ -209,6 +210,11 @@ while [ $# -gt 0 ]; do
# display help
scriptHelp
;;
--version)
# display script version
printf "\nMailcowRestore - Restore Mailcow from a borgbackup repo : Version %s\n\n" ${scriptVersion}
exit 0
;;
-l | --log)
# set logfile location
if [ -z "$2" ]; then