From a885baf9603061784bb7641749e3c7039376cc9b Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Wed, 23 Aug 2023 15:24:32 -0400 Subject: [PATCH] add desktop to grid --- salt/manager/tools/sbin/so-minion | 11 ++++------- setup/so-setup | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/salt/manager/tools/sbin/so-minion b/salt/manager/tools/sbin/so-minion index edc0b1404..de55c3a5b 100755 --- a/salt/manager/tools/sbin/so-minion +++ b/salt/manager/tools/sbin/so-minion @@ -187,15 +187,9 @@ function add_logstash_to_minion() { # Security Onion Desktop function add_desktop_to_minion() { printf '%s\n'\ - "host:"\ - " mainint: '$MNIC'"\ "desktop:"\ " gui:"\ - " enabled: true"\ - "sensoroni:"\ - " enabled: True"\ - " config:"\ - " node_description: '${NODE_DESCRIPTION//\'/''}'" >> $PILLARFILE + " enabled: true"\ >> $PILLARFILE } # Add basic host info to the minion file @@ -556,6 +550,9 @@ function createRECEIVER() { add_telegraf_to_minion } +function createDESKTOP() { + add_desktop_to_minion +} function testConnection() { retry 15 3 "salt '$MINION_ID' test.ping" True diff --git a/setup/so-setup b/setup/so-setup index c3172280f..8e8b7af43 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -333,7 +333,7 @@ if [[ $is_desktop ]]; then exit 1 fi -# if ! whiptail_desktop_install; then + if ! whiptail_desktop_install; then if [[ $is_desktop_iso ]]; then if whiptail_desktop_nongrid_iso; then # Remove setup from auto launching @@ -365,7 +365,7 @@ if [[ $is_desktop ]]; then exit 0 fi fi -# fi + fi # If you got this far then you want to join the grid is_minion=true @@ -574,6 +574,17 @@ if ! [[ -f $install_opt_file ]]; then check_manager_connection set_minion_info whiptail_end_settings + + elif [[ $is_desktop ]]; then + info "Setting up as node type desktop" + #check_requirements "desktop" + networking_needful + collect_mngr_hostname + add_mngr_ip_to_hosts + check_manager_connection + set_minion_info + whiptail_end_settings + fi if [[ $waitforstate ]]; then