Commit Graph

75 Commits

Author SHA1 Message Date
asif f8f3bf1539 refactor(func): Change default err code to 0 2026-07-23 22:17:15 -06:00
asif f8908d7830 feat(func): Write modified syslog fmt msg
Take input parameters and generate a modified syslog-style log entry.
2026-07-23 21:59:58 -06:00
asif 8a5a72e15a feat(func): Convert to uniform log levels
Take input text with various references to log levels and return a standardized uppercase log level name.
2026-07-23 21:57:30 -06:00
asif 1da49b06db feat(func): Convert text ucase, lcase 2026-07-23 21:56:19 -06:00
asif 1336c8e63b feat(func): Retrieve machine host name 2026-07-23 21:55:56 -06:00
asif 450733a8d5 feat(func): Generate ISO-8601 timestamp 2026-07-23 21:55:25 -06:00
asif 71da487aa8 style(fmt): Reformat shell script 2026-07-19 23:33:56 -06:00
asif 3be6eaee0c [preflight] Add check for logger dependency
'logger' is required to facilitate logging to the journaling system.
2026-07-19 18:52:34 -06:00
asif 5c6c8ec4ea [params] Create journal logging switch
Create boolean variable to store journal logging preference.
Set to 'false' by default. Add parameter to activate this preference.
Update help to include this new parameter.
2026-07-19 18:49:34 -06:00
asif c7297a512c [version] Update version, modified date 2026-07-19 15:44:40 -06:00
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