diff --git a/modules/default-flatpaks/README.md b/modules/default-flatpaks/README.md index 67de6e0..bf19163 100644 --- a/modules/default-flatpaks/README.md +++ b/modules/default-flatpaks/README.md @@ -18,7 +18,7 @@ The scripts are run on every boot by these services: This module stores the Flatpak remote configuration and Flatpak install/remove lists in `/usr/share/bluebuild/default-flatpaks/`. There are two subdirectories, `user` and `system` corresponding with the install level of the Flatpaks and repositories. Each directory has text files containing the IDs of flatpaks to `install` and `remove`, plus a `repo-info.yml` containing the details of the Flatpak repository. -This module also supports disabling & enabling notifications. +This module also supports disabling & enabling notifications. If not specified in the recipe, notifications are disabled by default. ## Local modification diff --git a/modules/default-flatpaks/v1/default-flatpaks.sh b/modules/default-flatpaks/v1/default-flatpaks.sh index b1ca239..7483db8 100644 --- a/modules/default-flatpaks/v1/default-flatpaks.sh +++ b/modules/default-flatpaks/v1/default-flatpaks.sh @@ -180,8 +180,12 @@ check_flatpak_id_validity_from_flathub "${1}" "user" echo "Configuring default-flatpaks notifications" NOTIFICATIONS=$(echo "$1" | yq -I=0 ".notify") CONFIG_NOTIFICATIONS="/usr/share/bluebuild/default-flatpaks/notifications" -cp -r "$MODULE_DIRECTORY"/default-flatpaks/config/notifications "$CONFIG_NOTIFICATIONS" -echo "$NOTIFICATIONS" >> "$CONFIG_NOTIFICATIONS" +cp -r "${MODULE_DIRECTORY}/default-flatpaks/config/notifications" "${CONFIG_NOTIFICATIONS}" +if [[ -z "${NOTIFICATIONS}" ]] || [[ "${NOTIFICATIONS}" == "null" ]]; then + echo "false" >> "${CONFIG_NOTIFICATIONS}" +else + echo "${NOTIFICATIONS}" >> "${CONFIG_NOTIFICATIONS}" +fi echo "Copying user modification template files"