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/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
{%- set ISAIRGAP = salt['pillar.get']('global:airgap', 'False') %}
|
{%- 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"
|
output_dir="/opt/so/saltstack/default/salt/strelka/rules"
|
||||||
mkdir -p $output_dir
|
mkdir -p $output_dir
|
||||||
repos="$output_dir/repos.txt"
|
repos="$output_dir/repos.txt"
|
||||||
@@ -27,7 +29,7 @@ updatecounter=0
|
|||||||
|
|
||||||
{% if ISAIRGAP is sameas true %}
|
{% if ISAIRGAP is sameas true %}
|
||||||
|
|
||||||
echo "Updating rules in airgap mode..."
|
echo "Airgap mode enabled."
|
||||||
|
|
||||||
clone_dir="/nsm/repo/rules/strelka"
|
clone_dir="/nsm/repo/rules/strelka"
|
||||||
repo_name="signature-base"
|
repo_name="signature-base"
|
||||||
@@ -88,8 +90,6 @@ fi
|
|||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
echo "Starting to update rules..."
|
|
||||||
|
|
||||||
gh_status=$(curl -s -o /dev/null -w "%{http_code}" http://github.com)
|
gh_status=$(curl -s -o /dev/null -w "%{http_code}" http://github.com)
|
||||||
clone_dir="/tmp"
|
clone_dir="/tmp"
|
||||||
if [ "$gh_status" == "200" ] || [ "$gh_status" == "301" ]; then
|
if [ "$gh_status" == "200" ] || [ "$gh_status" == "301" ]; then
|
||||||
@@ -165,4 +165,6 @@ else
|
|||||||
echo "No connectivity to Github...exiting..."
|
echo "No connectivity to Github...exiting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
|
echo "Finished rule updates at $(date)..."
|
||||||
|
|||||||
Reference in New Issue
Block a user