remove old rules prior to copy

This commit is contained in:
m0duspwnens committed 2023-07-11 10:20:04 -04:00
1 parent d7285d69a7
commit 304830d2ee
1 file changed
+2
@@ -18,6 +18,8 @@ SORULEDIR=/nsm/rules/yara
OUTPUTDIR=/opt/so/saltstack/local/salt/strelka/rules
mkdir -p $OUTPUTDIR
# remove all rules prior to copy so we can clear out old rules
rm -f $OUTPUTDIR/*
for i in $(find $SORULEDIR -name "*.yar" -o -name "*.yara"); do
rule_name=$(echo $i | awk -F '/' '{print $NF}')