scripts: refactoring & miscellaneous small changes#2499
scripts: refactoring & miscellaneous small changes#2499georglauterbach merged 13 commits intomasterfrom
Conversation
The changes are: 1. Replaced `""` wiht `''` where possible (reasoning: Bash is very implicit and I'd like to use `''` where possible to indicate no variables are expanded here) 2. `> /file` -> `>/file` according to our style guide 3. Some log adjustments for messages where I deemed it appropriate 4. Then, an error message from a Dovecot setup was also prevented (by adding a check whether the directory is present before a `: >...` command would create a file in this directory). These are all small, miscellaneous changes that I wanted to combine into one commit and ultimately one PR because I see no point in opening a PR for every small change here. I hope this is fine.
This ensure the last log message is actually logged before Supervisor logs the message that it received a SIGTERM. This makes reading the log easier because now the causal relationship is shown (we are terminating Supervisor, and not someone else and we're just logging it). I forgot to replace `""` with `''` in `update-check.sh`, so I included it here because this is the last commit before PR review.
casperklein
left a comment
There was a problem hiding this comment.
You removed the logging of date/time. But that is essential.
I like to see in the log, when update-check runs for the last time.
I re-added the timestamps to the log messages with the format from |
Instead of providing in each
PS: As we take the output from the function and don't directly print it, Edit: Until otherwise needed, just include That way, only the log file needs to be sourced, instead of index.sh. |
Will do 👍🏼 EDIT: Done in |
The new function will log a message with a proper timestamp. This is all handled in `log.sh`, we therefore not need to source other files too. This will be used in the future by `check-for-changes.sh` as well :)
polarathene
left a comment
There was a problem hiding this comment.
Not much to add, most of the concerns I marked up for review earlier was already caught and addressed by you both 😅
None of these changes are all that important, feel free to dismiss them.
Co-authored-by: Casper <[email protected]> Co-authored-by: Brennan Kinney <[email protected]>
Co-authored-by: Brennan Kinney <[email protected]>
Description
Please see the commit messages. This is a housekeeping PR which includes several small changes.
Type of change
Checklist:
docs/)