From 43712182a0275d55bc2b15135a41e941dc267ade Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Mon, 20 Mar 2023 10:46:23 -0400 Subject: [PATCH 1/4] update help for clarity --- salt/common/tools/sbin/so-minion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/common/tools/sbin/so-minion b/salt/common/tools/sbin/so-minion index b565f5a31..d14955e61 100755 --- a/salt/common/tools/sbin/so-minion +++ b/salt/common/tools/sbin/so-minion @@ -23,7 +23,7 @@ if [[ $# -lt 1 ]]; then echo " accept: Accepts a new key and adds the minion files" echo " delete: Removes the key and deletes the minion files" echo " reject: Rejects a key" - echo " test: Ingest test data" + echo " test: Perform minion test" echo "" exit 1 fi From da1c501cf7a9c1d7ce13ff1184cac575b5f17363 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Mon, 20 Mar 2023 11:01:07 -0400 Subject: [PATCH 2/4] Move old setup/error logs before any logs are written on a subsequent setup invocation --- setup/so-setup | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setup/so-setup b/setup/so-setup index 814fc6e79..5356965aa 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -58,6 +58,10 @@ while [[ $# -gt 0 ]]; do esac done +# Preserve old setup/error logs +[ -f "$error_log" ] && mv "$error_log" "$error_log.$(+%Y-%m-%dT%H:%M:%S)" +[ -f "$setup_log" ] && mv "$setup_log" "$setup_log.$(+%Y-%m-%dT%H:%M:%S)" + # Let's see what OS we are dealing with here detect_os @@ -134,9 +138,7 @@ title "Checking to see if install has run before" if [[ -f /root/accept_changes ]]; then is_reinstall=true whiptail_reinstall - info "Old setup detected. Moving the last setup.log to setup.log.bak" - mv "$setup_log" "$setup_log.bak" - [ -f "$error_log" ] && mv "$error_log" "$error_log.bak" + info "Old setup detected. Preparing for reinstallation." reinstall_init reset_proxy fi @@ -267,7 +269,7 @@ if ! [[ -f $install_opt_file ]]; then if (whiptail_you_sure); then true else - error "User cancelled setup." + info "User cancelled setup." whiptail_cancel fi # If this is an analyst install lets streamline the process. From 6b8b7df3c23e457d2b75bb53c0c1f4267cbcfa35 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Mon, 20 Mar 2023 11:04:28 -0400 Subject: [PATCH 3/4] Move old setup/error logs before any logs are written on a subsequent setup invocation --- setup/so-setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/so-setup b/setup/so-setup index 5356965aa..88a2fd045 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -59,8 +59,8 @@ while [[ $# -gt 0 ]]; do done # Preserve old setup/error logs -[ -f "$error_log" ] && mv "$error_log" "$error_log.$(+%Y-%m-%dT%H:%M:%S)" -[ -f "$setup_log" ] && mv "$setup_log" "$setup_log.$(+%Y-%m-%dT%H:%M:%S)" +[ -f "$error_log" ] && mv "$error_log" "$error_log.$(date +%Y-%m-%dT%H:%M:%S)" +[ -f "$setup_log" ] && mv "$setup_log" "$setup_log.$(date +%Y-%m-%dT%H:%M:%S)" # Let's see what OS we are dealing with here detect_os From 325e767587963cdf936e1caa1abcf0718431888c Mon Sep 17 00:00:00 2001 From: Josh Brower Date: Mon, 20 Mar 2023 12:11:45 -0400 Subject: [PATCH 4/4] Remove hosts file edit --- salt/idh/init.sls | 2 -- 1 file changed, 2 deletions(-) diff --git a/salt/idh/init.sls b/salt/idh/init.sls index d1ba5ce33..2cf22c358 100644 --- a/salt/idh/init.sls +++ b/salt/idh/init.sls @@ -74,8 +74,6 @@ so-idh: - file: opencanary_config - require: - file: opencanary_config - - extra_hosts: - - {{ GLOBALS.manager }}:{{ GLOBALS.manager_ip }} append_so-idh_so-status.conf: file.append: