mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Add support for Airgap for Playbooks
This commit is contained in:
@@ -1069,6 +1069,11 @@ update_airgap_rules() {
|
||||
rsync -a $UPDATE_DIR/agrules/securityonion-resources/* /nsm/securityonion-resources/
|
||||
}
|
||||
|
||||
update_airgap_playbooks() {
|
||||
# Copy the playbooks over to update them for airgap.
|
||||
rsync -a --delete --chown=socore:socore $UPDATE_DIR/airgap-resources/playbooks/* /nsm/airgap-resources/playbooks/
|
||||
}
|
||||
|
||||
update_airgap_repo() {
|
||||
# Update the files in the repo
|
||||
echo "Syncing new updates to /nsm/repo"
|
||||
@@ -1253,6 +1258,7 @@ apply_hotfix() {
|
||||
elif [[ "$INSTALLEDVERSION" == "2.4.30" ]] ; then
|
||||
if [[ $is_airgap -eq 0 ]]; then
|
||||
update_airgap_rules
|
||||
update_airgap_playbooks
|
||||
fi
|
||||
if [[ -f /etc/pki/managerssl.key.old ]]; then
|
||||
echo "Skipping Certificate Generation"
|
||||
@@ -1418,6 +1424,8 @@ main() {
|
||||
if [[ $is_airgap -eq 0 ]]; then
|
||||
echo "Updating Rule Files to the Latest."
|
||||
update_airgap_rules
|
||||
echo "Updating Playbooks to the Latest."
|
||||
update_airgap_playbooks
|
||||
fi
|
||||
|
||||
# since we don't run the backup.config_backup state on import we wont snapshot previous version states and pillars
|
||||
|
||||
Reference in New Issue
Block a user