Commit Graph

65 Commits

Author SHA1 Message Date
Asif Bacchus 1ffd374a4f fix: set TERM for tput if not set
- stop warning messages in syslog from systemd invocation
2021-05-10 02:55:16 -06:00
Asif Bacchus e344b027f9 refactor: remove err label on code 99 2021-05-09 10:28:17 -06:00
Asif Bacchus 8801e55e30 style: fix typo, invalid hosts warning summary 2021-05-09 10:24:15 -06:00
Asif Bacchus b05192a613 fix: wrong pipeline variable ref in writelog 2021-05-09 09:49:47 -06:00
Asif Bacchus d796bf6f63 fix: wrong variable referenced for list to update 2021-05-09 09:47:41 -06:00
Asif Bacchus db8a615d36 refactor: use function to write to log
- much more consistent
- one place to change all entries
2021-05-09 09:46:15 -06:00
Asif Bacchus 31eb503245 style: change 'domain' to 'host'
terminology is more correct and less potentially confusing
2021-05-09 08:48:56 -06:00
Asif Bacchus 3f9d164285 style: rename functions to clear spellcheck 2021-05-09 08:45:24 -06:00
Asif Bacchus 39f5445c28 perf: simpler iteration condition checking
- less complex conditions
- easier code to understand
- cleans up extraneous delimiters
- skips null entries immediately
2021-05-09 08:44:47 -06:00
Asif Bacchus 220263c1f9 refactor: change log tags
- separate tags for summary vs individual messages for accurate logwatch
 counting
- update code 99 exit to match other errors
- change CF error tags to match new format
2021-05-09 07:08:44 -06:00
Asif Bacchus fe0f9caef1 feature: process multiple CF API errors
- handle multiple CF API errors properly by grouping and reporting
- update error messages
- unify CF error tags in log to CF-ERROR
2021-05-09 06:49:49 -06:00
Asif Bacchus d9600c822f style: alphabetize functions 2021-05-09 06:39:55 -06:00
Asif Bacchus 5569bbc535 refactor: remove cfEmail
- authorized email not required by CF when using bearer token
2021-05-09 04:35:46 -06:00
Asif Bacchus f4f3c89e5e refactor: reduce nesting, update err codes
- detect curl vs CF API errors separately
- error 25 changed to error 3 (curl/network)
- error 25 reservedfor CF API errors
- add CF error messages to all err 25s
- change error 98 (updates) to error 26
- remove error code for exit with warning
- add CF error messages on update failures
- drastically reduce if/else nesting
2021-05-09 04:33:41 -06:00
Asif Bacchus a7064805c3 style: log params in default colour vs magenta 2021-05-09 03:58:35 -06:00
Asif Bacchus c1c7fd5149 style: correct spelling of Cloudflare 2021-05-09 00:42:53 -06:00
Asif Bacchus 2805f560d7 docs: fix typos in comments, help, etc 2021-05-08 04:24:26 -06:00
Asif Bacchus 52f5ef96e8 refactor: replace BASH script with new POSIX one 2021-05-08 04:00:15 -06:00
Asif Bacchus 97c7105cb9 Corrected [INFO] tagging to have '--' prepended for consistency 2018-09-27 17:02:49 -06:00
Asif Bacchus 3fd8a66257 Cleaned up code to remove unused variables and quote where needed 2018-09-26 00:35:33 -06:00
Asif Bacchus 07820587d8 Changed colour used for STATUS update.
Fixed typo in "Script Completed" notation.
2018-09-25 18:43:35 -06:00
Asif Bacchus b49be41577 Fixed spacing typo 2018-09-25 18:41:40 -06:00
Asif Bacchus c7618c7a4b Changed logfile notation for IP4 vs IP6 hostname list 2018-09-25 18:39:23 -06:00
Asif Bacchus f8a23992ea Fixed timestamp variable 2018-09-25 18:38:48 -06:00
Asif Bacchus 523c9984a6 Added INFO log tags to hostname lookup list 2018-09-25 18:36:40 -06:00
Asif Bacchus a09dac147a Updated help text 2018-09-25 18:24:06 -06:00
Asif Bacchus 8a0362a6e1 Updated logging with colour variables and logging tags 2018-09-25 18:17:30 -06:00
Asif Bacchus 92519055fc Reformatted quit function log output 2018-09-25 18:01:29 -06:00
Asif Bacchus 3585490f80 Added formatting variables 2018-09-25 17:55:58 -06:00
Asif Bacchus 356dfc7f21 Removed [SUCCESS] tag from scipt completion notation 2018-09-25 17:49:12 -06:00
Asif Bacchus 1e8ff53075 Replaced repeated timestamp with single variable 2018-09-25 17:47:30 -06:00
Asif Bacchus 12c0cdde93 quoted logFile variable to prevent globbing 2018-09-25 17:24:14 -06:00
Asif Bacchus 841fbf2bc3 Updated logfile name generation to strip final extension from scriptName 2018-09-16 01:45:18 -06:00
Asif Bacchus e2b7b5976d Bugfix: IP address now logged in all circumstances. 2018-09-14 00:21:42 -06:00
Asif Bacchus 90e50bf74b piped output from curl check to null 2018-09-14 00:06:02 -06:00
Asif Bacchus 24ade5322f Check if curl installed 2018-09-14 00:01:30 -06:00
Asif Bacchus 828dea9aee Updated colour output in logfile. 2018-09-13 23:52:32 -06:00
Asif Bacchus 8d7328c0d9 Removed verbose logging 2018-09-13 23:45:17 -06:00
Asif Bacchus 9e10e4ddd2 Updated output colours 2018-09-13 23:31:58 -06:00
Asif Bacchus 5a91819f3b Cleaned up updated section to compact code.
Report update necessity in all logs.
2018-09-13 23:27:18 -06:00
Asif Bacchus b366996b85 Added timestamp to all logging entries 2018-09-13 21:58:56 -06:00
Asif Bacchus 9eeaa1af31 Updated help and default logfile name 2018-09-13 21:42:14 -06:00
Asif Bacchus c7223c32b3 Add logFile output to all sections 2018-09-13 21:38:09 -06:00
Asif Bacchus ea979c5c93 IP: removed redundant mode notification. Logged IP being used. 2018-09-13 21:26:24 -06:00
Asif Bacchus d9d5f71b5a Log script start and mode 2018-09-13 21:25:12 -06:00
Asif Bacchus 26042b952e Removed 'quiet' logging.
It's the default and writes directly to the logFile
2018-09-13 21:22:02 -06:00
Asif Bacchus e24f578b8f Added log verbosity options 2018-09-13 21:15:31 -06:00
Asif Bacchus 4d28f068f0 Reordered IP address section.
Always display  IP being used whether provided or detected.
2018-09-13 21:02:31 -06:00
Asif Bacchus d9804ee8ec Removed redundant error messages on scriptHelp invocation. 2018-09-13 20:59:41 -06:00
Asif Bacchus 37d51c50e7 Added update failure notification 2018-09-13 20:54:08 -06:00