Copy latest rules when using airgaps

This commit is contained in:
Mike Reeves
2021-02-23 11:21:23 -05:00
parent 40721d7dec
commit 3b32eb539f

View File

@@ -379,6 +379,10 @@ unmount_update() {
umount /tmp/soagupdate umount /tmp/soagupdate
} }
update_airgap_rules() {
# Copy the rules over to update them for airgap.
rsync -av $UPDATE_DIR/SecurityOnion/agrules/* /nsm/repo/rules/
}
update_centos_repo() { update_centos_repo() {
# Update the files in the repo # Update the files in the repo
@@ -588,6 +592,11 @@ echo "Making pillar changes."
pillar_changes pillar_changes
echo "" echo ""
if [ $is_airgap -eq 0 ]; then
echo "Updating Rule Files to the Latest."
update_airgap_rules
fi
# Only update the repo if its airgap # Only update the repo if its airgap
if [[ $is_airgap -eq 0 ]] && [[ "$UPGRADESALT" != "1" ]]; then if [[ $is_airgap -eq 0 ]] && [[ "$UPGRADESALT" != "1" ]]; then
update_centos_repo update_centos_repo