From d26484fe1a75214b3b9d1f1f5fd65dea1b1ce3b7 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Mon, 26 Jun 2023 15:27:18 -0400 Subject: [PATCH 1/2] so-desktop-install --- .../{so-analyst-install => so-desktop-install} | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename salt/common/tools/sbin_jinja/{so-analyst-install => so-desktop-install} (89%) diff --git a/salt/common/tools/sbin_jinja/so-analyst-install b/salt/common/tools/sbin_jinja/so-desktop-install similarity index 89% rename from salt/common/tools/sbin_jinja/so-analyst-install rename to salt/common/tools/sbin_jinja/so-desktop-install index 775be2041..ecdd745ff 100755 --- a/salt/common/tools/sbin_jinja/so-analyst-install +++ b/salt/common/tools/sbin_jinja/so-desktop-install @@ -12,7 +12,7 @@ {% if grains.master == grains.id.split('_')|first -%} source /usr/sbin/so-common -doc_workstation_url="$DOC_BASE_URL/analyst-vm.html" +doc_desktop_url="$DOC_BASE_URL/desktop.html" pillar_file="/opt/so/saltstack/local/pillar/minions/{{grains.id}}.sls" if [ -f "$pillar_file" ]; then @@ -48,7 +48,7 @@ if [ -f "$pillar_file" ]; then # Add workstation pillar to the minion's pillar file printf '%s\n'\ - "workstation:"\ + "desktop:"\ " gui:"\ " enabled: true"\ "" >> "$pillar_file" @@ -64,8 +64,8 @@ if [ -f "$pillar_file" ]; then echo "There was an issue applying the workstation state. Please review the log above or at /opt/so/log/salt/minion." fi else # workstation is already added - echo "The workstation pillar already exists in $pillar_file." - echo "To enable/disable the gui, set 'workstation:gui:enabled' to true or false in $pillar_file." + echo "The desktop pillar already exists in $pillar_file." + echo "To enable/disable the gui, set 'desktop:gui:enabled' to true or false in $pillar_file." echo "Additional documentation can be found at $doc_workstation_url." fi else # if the pillar file doesn't exist @@ -83,7 +83,7 @@ echo "Since this is not a manager, the pillar values to enable analyst workstati {#- if not Rocky #} {%- else %} -echo "The Analyst Workstation can only be installed on Rocky. Please view the documentation at $doc_workstation_url." +echo "The Security Onion Desktop can only be installed on Rocky Linux. Please view the documentation at $doc_workstation_url." {#- endif grains.os == Rocky #} {% endif -%} From 02e6e11be73de22cbb9612e349addaf0c3f02870 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Mon, 26 Jun 2023 15:34:48 -0400 Subject: [PATCH 2/2] so-desktop-install --- .../tools/sbin_jinja/so-desktop-install | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/salt/common/tools/sbin_jinja/so-desktop-install b/salt/common/tools/sbin_jinja/so-desktop-install index ecdd745ff..96f1ddd49 100755 --- a/salt/common/tools/sbin_jinja/so-desktop-install +++ b/salt/common/tools/sbin_jinja/so-desktop-install @@ -6,7 +6,7 @@ # Elastic License 2.0. -{# we only want the script to install the workstation if it is Rocky -#} +{# we only want the script to install the desktop if it is Rocky -#} {% if grains.os == 'Rocky' -%} {# if this is a manager -#} {% if grains.master == grains.id.split('_')|first -%} @@ -16,7 +16,7 @@ doc_desktop_url="$DOC_BASE_URL/desktop.html" pillar_file="/opt/so/saltstack/local/pillar/minions/{{grains.id}}.sls" if [ -f "$pillar_file" ]; then - if ! grep -q "^workstation:$" "$pillar_file"; then + if ! grep -q "^desktop:$" "$pillar_file"; then FIRSTPASS=yes while [[ $INSTALL != "yes" ]] && [[ $INSTALL != "no" ]]; do @@ -46,36 +46,36 @@ if [ -f "$pillar_file" ]; then exit 0 fi - # Add workstation pillar to the minion's pillar file + # Add desktop pillar to the minion's pillar file printf '%s\n'\ "desktop:"\ " gui:"\ " enabled: true"\ "" >> "$pillar_file" - echo "Applying the workstation state. This could take some time since there are many packages that need to be installed." - if salt-call state.apply workstation -linfo queue=True; then # make sure the state ran successfully + echo "Applying the desktop state. This could take some time since there are many packages that need to be installed." + if salt-call state.apply desktop -linfo queue=True; then # make sure the state ran successfully echo "" - echo "Analyst workstation has been installed!" + echo "Analyst desktop has been installed!" echo "Press ENTER to reboot or Ctrl-C to cancel." read pause reboot; else - echo "There was an issue applying the workstation state. Please review the log above or at /opt/so/log/salt/minion." + echo "There was an issue applying the desktop state. Please review the log above or at /opt/so/log/salt/minion." fi - else # workstation is already added + else # desktop is already added echo "The desktop pillar already exists in $pillar_file." echo "To enable/disable the gui, set 'desktop:gui:enabled' to true or false in $pillar_file." - echo "Additional documentation can be found at $doc_workstation_url." + echo "Additional documentation can be found at $doc_desktop_url." fi else # if the pillar file doesn't exist - echo "Could not find $pillar_file and add the workstation pillar." + echo "Could not find $pillar_file and add the desktop pillar." fi {#- if this is not a manager #} {% else -%} -echo "Since this is not a manager, the pillar values to enable analyst workstation must be set manually. Please view the documentation at $doc_workstation_url." +echo "Since this is not a manager, the pillar values to enable Security Onion Desktop must be set manually. Please view the documentation at $doc_desktop_url." {#- endif if this is a manager #} {% endif -%} @@ -83,7 +83,7 @@ echo "Since this is not a manager, the pillar values to enable analyst workstati {#- if not Rocky #} {%- else %} -echo "The Security Onion Desktop can only be installed on Rocky Linux. Please view the documentation at $doc_workstation_url." +echo "The Security Onion Desktop can only be installed on Rocky Linux. Please view the documentation at $doc_desktop_url." {#- endif grains.os == Rocky #} {% endif -%}