mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Add timestamps to so-yara-update output
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
{%- set ISAIRGAP = salt['pillar.get']('global:airgap', 'False') %}
|
||||
|
||||
echo "Starting to check for yara rule updates at $(date)..."
|
||||
|
||||
output_dir="/opt/so/saltstack/default/salt/strelka/rules"
|
||||
mkdir -p $output_dir
|
||||
repos="$output_dir/repos.txt"
|
||||
@@ -27,7 +29,7 @@ updatecounter=0
|
||||
|
||||
{% if ISAIRGAP is sameas true %}
|
||||
|
||||
echo "Updating rules in airgap mode..."
|
||||
echo "Airgap mode enabled."
|
||||
|
||||
clone_dir="/nsm/repo/rules/strelka"
|
||||
repo_name="signature-base"
|
||||
@@ -88,8 +90,6 @@ fi
|
||||
|
||||
{% else %}
|
||||
|
||||
echo "Starting to update rules..."
|
||||
|
||||
gh_status=$(curl -s -o /dev/null -w "%{http_code}" http://github.com)
|
||||
clone_dir="/tmp"
|
||||
if [ "$gh_status" == "200" ] || [ "$gh_status" == "301" ]; then
|
||||
@@ -166,3 +166,5 @@ else
|
||||
exit 1
|
||||
fi
|
||||
{%- endif -%}
|
||||
|
||||
echo "Finished rule updates at $(date)..."
|
||||
|
||||
Reference in New Issue
Block a user