update scriptHelp
This commit is contained in:
		
							parent
							
								
									868398858e
								
							
						
					
					
						commit
						760399a0fd
					
				
							
								
								
									
										18
									
								
								.vscode/numbered-bookmarks.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								.vscode/numbered-bookmarks.json
									
									
									
									
										vendored
									
									
								
							| @ -1,19 +1,3 @@ | |||||||
| { | { | ||||||
| 	"bookmarks": [ | 	"bookmarks": [] | ||||||
| 		{ |  | ||||||
| 			"fsPath": "$ROOTPATH$/pilerBackup/pilerbackup.sh", |  | ||||||
| 			"bookmarks": [ |  | ||||||
| 				-1, |  | ||||||
| 				113, |  | ||||||
| 				-1, |  | ||||||
| 				-1, |  | ||||||
| 				-1, |  | ||||||
| 				-1, |  | ||||||
| 				-1, |  | ||||||
| 				-1, |  | ||||||
| 				-1, |  | ||||||
| 				-1 |  | ||||||
| 			] |  | ||||||
| 		} |  | ||||||
| 	] |  | ||||||
| } | } | ||||||
| @ -13,6 +13,7 @@ export PATH=$PATH:/usr/local/bin | |||||||
| 
 | 
 | ||||||
| ### text formatting presents | ### text formatting presents | ||||||
| if command -v tput > /dev/null; then | if command -v tput > /dev/null; then | ||||||
|  |     bold=$(tput bold) | ||||||
|     cyan=$(tput setaf 6) |     cyan=$(tput setaf 6) | ||||||
|     err=$(tput bold)$(tput setaf 1) |     err=$(tput bold)$(tput setaf 1) | ||||||
|     magenta=$(tput setaf 5) |     magenta=$(tput setaf 5) | ||||||
| @ -22,6 +23,7 @@ if command -v tput > /dev/null; then | |||||||
|     width=$(tput cols) |     width=$(tput cols) | ||||||
|     yellow=$(tput setaf 3) |     yellow=$(tput setaf 3) | ||||||
| else | else | ||||||
|  |     bold="" | ||||||
|     cyan="" |     cyan="" | ||||||
|     err="" |     err="" | ||||||
|     magenta="" |     magenta="" | ||||||
| @ -112,71 +114,59 @@ exitError () { | |||||||
| 
 | 
 | ||||||
| # display script help information | # display script help information | ||||||
| scriptHelp () { | scriptHelp () { | ||||||
|     printf "\n${cyan}%s\n" "--------------------------------------------------------------------------------" |     newline | ||||||
| 
 |     printf "%sUsage: %s [parameters]%s\n\n" "$bold" "$scriptName" "$norm" | ||||||
|     printf "Usage:${norm} %s [parameters]\n\n" "$scriptName" |     textblock "There are no mandatory parameters. If a parameter is not supplied, its default value will be used. In the case of a switch parameter, it will remain DEactivated by default." | ||||||
|     printf "${cyan}Parameters ${yellow}(default value):${norm}\n" |     newline | ||||||
|     printf "There are NO mandatory parameters.  If a parameter is not " |     textblock "Parameters are listed then followed by a description of their effect on the following line. Finally, if a default value exists, it will be listed on the next line in (parentheses)." | ||||||
|     printf "supplied, it's\n" |     newline | ||||||
|     printf "default value will be used.  In the case of a switch parameter, " |     textblock "${magenta}--- script related ---${norm}" | ||||||
|     printf "it will\n" |     newline | ||||||
|     printf "remain deactivated if not specified.\n\n" |     switchTextblock "-c | --config | --details" | ||||||
| 
 |     textblock "Path to the configuration key/value pair file for this script." | ||||||
|     printf "${magenta}script related\n" |     defaultsTextblock "(scriptPath/scriptName.details)" | ||||||
|     printf "${cyan}-c, --config, --details${norm}\n" |     newline | ||||||
|     printf "Path to the configuration key/value pair file for this script.\n" |     switchTextblock "-h | -? | --help" | ||||||
|     printf "${yellow}(scriptPath/scriptName.details)${norm}\n\n" |     textblock "This help screen." | ||||||
|     printf "${cyan}-h, -?, --help${norm}\n" |     newline | ||||||
|     printf "This help screen.\n\n" |     switchTextblock "-l | --log" | ||||||
|     printf "${cyan}-l, --log${norm}\n" |     textblock "Path to write log file." | ||||||
|     printf "Path to write log file.\n" |     defaultsTextblock "(scriptPath/scriptName.log)" | ||||||
|     printf "${yellow}(scriptPath/scriptName.log)${norm}\n\n" |     newline | ||||||
|     printf "${cyan}-v, --verbose${norm}\n" |     switchTextblock "[SWITCH] -v | --verbose" | ||||||
|     printf "Log borg output with increased verbosity (list all files). " |     textblock "Log borg output with increased verbosity (list all files). Careful! Your log file can get very large very quickly!" | ||||||
|     printf "Careful! Your\n" |     defaultsTextblock "(normal output, option is OFF)" | ||||||
|     printf "log file can get large very quickly! This is a switch value, " |     newline | ||||||
|     printf "specifying it\n" |     textblock "${magenta}--- export options ---${norm}" | ||||||
|     printf "will turn the option ON.\n" |     newline | ||||||
|     printf "${yellow}(normal output, option is OFF)${norm}\n\n" |     switchTextblock "[SWITCH] -a | --all" | ||||||
| 
 |     textblock "Export ALL email saved by piler. This is generally only useful for an initial backup. Setting this switch will override any specified start/end dates." | ||||||
|     printf "${magenta}export options\n" |     defaultsTextblock "(use start/end dates, option is OFF)" | ||||||
|     printf "${cyan}-a, --all${norm}\n" |     newline | ||||||
|     printf "Export ALL email saved by piler. This is generally only useful " |     switchTextblock "--start" | ||||||
|     printf "for an initial\n" |     textblock "Export email starting from this date (inclusive). Date MUST be provided in YYYY.MM.DD format." | ||||||
|     printf "backup. This is a switch parameter and WILL override specified " |     defaultsTextblock "(yesterday's date)" | ||||||
|     printf "start/end dates.\n" |     newline | ||||||
|     printf "${yellow}(option is OFF, use start/end dates)${norm}\n\n" |     switchTextblock "--end" | ||||||
|     printf "${cyan}--start${norm}\n" |     textblock "Export email ending at this date (inclusive). Date MUST be provided in YYYY.MM.DD format." | ||||||
|     printf "Export email starting from this date (inclusive)\n" |     defaultsTextblock "(yesterday's date)" | ||||||
|     printf "Date MUST be provided in the format 'YYYY.MM.DD'\n" |     newline | ||||||
|     printf "${yellow}(Yesterday's date)${norm}\n\n" |     textblock "${magenta}--- 503 functionality ---${norm}" | ||||||
|     printf "${cyan}--end${norm}\n" |     newline | ||||||
|     printf "Export email ending at this date (inclusive)\n" |     switchTextblock "[SWITCH] -5 | --use-503" | ||||||
|     printf "Date MUST be provided in the format 'YYYY.MM.DD'\n" |     textblock "Copy an 'error 503' page/indicator file to your webroot for your webserver to find. Specifying this option will enable other 503 options." | ||||||
|     printf "${yellow}(Yesterday's date)${norm}\n\n" |     defaultsTextblock "(do NOT copy, option is OFF)" | ||||||
| 
 |     newline | ||||||
|     printf "${magenta}503 functionality\n" |     switchTextblock "--503-path" | ||||||
|     printf "${cyan}-5, --use-503${norm}\n" |     textblock "Path to the file you want copied to your webroot as the 'error 503' page." | ||||||
|     printf "Copy an 'error 503' page to your webroot for your webserver to " |     defaultsTextblock "(scriptPath/503_backup.html)" | ||||||
|     printf "find. This is a\n" |     newline | ||||||
|     printf "switch value, specifying it will instruct the script to copy the " |     switchTextblock "-w | --webroot" | ||||||
|     printf "error page.\n" |     textblock "Path to where the 'error 503' file should be copied." | ||||||
|     printf "${yellow}(do NOT copy, option is OFF)${norm}\n\n" |     defaultsTextblock "(/usr/share/nginx/html/)" | ||||||
|     printf "${cyan}--503-path${norm}\n" |     newline | ||||||
|     printf "Path to the file you want copied to your webroot as the 'error " |     textblock "More details and examples of script usage can be found in the repo wiki at ${yellow}https://git.asifbacchus.app/asif/pilerBackup/wiki${norm}" | ||||||
|     printf "503' page during\n" |     newline | ||||||
|     printf "backup operations.\n" |  | ||||||
|     printf "${yellow}(scriptPath/503_backup.html)${norm}\n\n" |  | ||||||
|     printf "${cyan}-w, --webroot${norm}\n" |  | ||||||
|     printf "Path to where the 'error 503' file should be copied during " |  | ||||||
|     printf "backups.\n" |  | ||||||
|     printf "${yellow}(/usr/share/nginx/html)${norm}\n\n" |  | ||||||
| 
 |  | ||||||
|     printf "More details and examples of script usage can be found in the " |  | ||||||
|     printf "repo wiki at\n" |  | ||||||
|     printf "${yellow}https://git.asifbacchus.app/asif/pilerBackup/wiki${norm}\n" |  | ||||||
| 
 |  | ||||||
|     printf "${cyan}%s${norm}\n\n" "--------------------------------------------------------------------------------" |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| # generate dynamic timestamps | # generate dynamic timestamps | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user