fix: allow for any amount of whitespaces after config section in update manager

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
th33xitus
2022-10-30 18:27:13 +01:00
parent 5524a40f04
commit 6116fc92cf
3 changed files with 3 additions and 3 deletions

View File

@@ -419,7 +419,7 @@ function patch_fluidd_update_manager() {
patched="false"
for conf in ${moonraker_configs}; do
if ! grep -Eq "^\[update_manager fluidd\]$" "${conf}"; then
if ! grep -Eq "^\[update_manager fluidd\]\s*$" "${conf}"; then
### add new line to conf if it doesn't end with one
[[ $(tail -c1 "${conf}" | wc -l) -eq 0 ]] && echo "" >> "${conf}"