mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Dont bail - just wait for enter
This commit is contained in:
@@ -680,16 +680,15 @@ playbook_migration() {
|
|||||||
active_rules_count=$(find /opt/so/rules/elastalert/playbook/ -type f -name "*.yaml" | wc -l)
|
active_rules_count=$(find /opt/so/rules/elastalert/playbook/ -type f -name "*.yaml" | wc -l)
|
||||||
|
|
||||||
if [[ "$active_rules_count" -gt 0 ]]; then
|
if [[ "$active_rules_count" -gt 0 ]]; then
|
||||||
# Prompt the user to AGREE if active Elastalert rules found
|
# Prompt the user to press ENTER if active Elastalert rules found
|
||||||
echo
|
echo
|
||||||
echo "$active_rules_count Active Elastalert/Playbook rules found."
|
echo "$active_rules_count Active Elastalert/Playbook rules found."
|
||||||
echo "In preparation for the new Detections module, they will be backed up and then disabled."
|
echo "In preparation for the new Detections module, they will be backed up and then disabled."
|
||||||
echo
|
echo
|
||||||
echo "If you would like to proceed, then type AGREE and press ENTER."
|
echo "Press ENTER to proceed."
|
||||||
echo
|
echo
|
||||||
# Read user input
|
# Read user input
|
||||||
read INPUT
|
read -r
|
||||||
if [ "${INPUT^^}" != 'AGREE' ]; then fail "SOUP canceled."; fi
|
|
||||||
|
|
||||||
echo "Backing up the Elastalert rules..."
|
echo "Backing up the Elastalert rules..."
|
||||||
rsync -av --stats /opt/so/rules/elastalert/playbook/*.yaml /nsm/backup/detections-migration/elastalert/
|
rsync -av --stats /opt/so/rules/elastalert/playbook/*.yaml /nsm/backup/detections-migration/elastalert/
|
||||||
|
|||||||
Reference in New Issue
Block a user