Add timestamps to so-yara-update output

This commit is contained in:
Jason Ertel
2020-12-11 10:08:10 -05:00
parent 14f28e38be
commit 0915ae30e4

View File

@@ -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)..."