From 73dacdcbff8ef8594168ddd31499d3aca9cbd8c2 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Thu, 23 Sep 2021 09:52:23 -0400 Subject: [PATCH] Add logscan to images for pull during soup if it's enabled --- salt/common/tools/sbin/so-image-common | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/salt/common/tools/sbin/so-image-common b/salt/common/tools/sbin/so-image-common index 9b6e2174a..0b0f89698 100755 --- a/salt/common/tools/sbin/so-image-common +++ b/salt/common/tools/sbin/so-image-common @@ -17,6 +17,7 @@ # NOTE: This script depends on so-common IMAGEREPO=security-onion-solutions +STATUS_CONF='/opt/so/conf/so-status/so-status.conf' # shellcheck disable=SC2120 container_list() { @@ -137,6 +138,11 @@ update_docker_containers() { if [[ $result -eq 0 ]]; then cat $SIGNPATH/KEYS | gpg --import - >> "$LOG_FILE" 2>&1 fi + + # If downloading for soup, check if any optional images need to be pulled + if [[ $CURLTYPE == 'soup' ]]; then + grep -q "so-logscan" "$STATUS_CONF" && TRUSTED_CONTAINERS+=("so-logscan") + fi # Download the containers from the interwebs for i in "${TRUSTED_CONTAINERS[@]}"